ó
l·Y]c           @   s¨   d  Z  d Z d Z d Z d g Z d „  Z d „  Z d „  Z e e _	 e e _
 d e _ d e _ e e _ e e _ d	 e _ e e d
 ƒ j e d <d „  Z g  e _ d S(   sa  
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.
s   3.0.0s   Lisandro Dalcins$   MPI Forum, MPICH Team, Open MPI Teamt   MPIc          C   s)   d d l  m }  m } |  | t ƒ d ƒ S(   sy  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()])

    iÿÿÿÿ(   t   joint   dirnamet   include(   t   os.pathR   R   t   __file__(   R   R   (    (    s.   lib/python2.7/site-packages/mpi4py/__init__.pyt   get_include#   s    c          C   s†   d d l  m }  m } y d d l m } Wn! t k
 rM d d l m } n X| ƒ  } | j |  | t ƒ d ƒ ƒ t | j	 d ƒ ƒ S(   s/   Return a dictionary with information about MPI.iÿÿÿÿ(   R   R   (   t   ConfigParsers   mpi.cfgt   mpi(
   R   R   R   t   configparserR   t   ImportErrort   readR   t   dictt   items(   R   R   R   t   parser(    (    s.   lib/python2.7/site-packages/mpi4py/__init__.pyt
   get_config3   s    	c          K   si   x5 |  D]- } t  t | ƒ s t d j | ƒ ƒ ‚ q q Wx* |  j ƒ  D] \ } } t t | | ƒ qE Wd S(   sÏ  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').

    s   unexpected argument '{0}'N(   t   hasattrt   rct	   TypeErrort   formatR   t   setattr(   t   kargst   keyt   value(    (    s.   lib/python2.7/site-packages/mpi4py/__init__.pyR   ?   s
    t   multiplet	   exceptiont   syss   .rcc            s¶  d d l  ‰ d d l ‰  d d l m } m } m } m } ‡  ‡ f d †  } | j d d ƒ } | rÃ |  d k r’ d ˆ  j	 k r’ | ˆ  j	 d <q’ n  |  d k rÃ d ˆ  j	 k rÀ | ˆ  j	 d <qÀ qÃ n  | j d g  ƒ } t
 | t ƒ rð | g } n t | ƒ } ˆ  j j t ƒ }	 | j ˆ  j j |	 d ƒ ƒ | |  | ƒ }
 |
 d k r]t d j |  ƒ ƒ ‚ n  | |
 | | Bƒ } | r•t j j |  | |
 f f ƒ n d d l m } | | ƒ  ƒ d S(   s.  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.

    iÿÿÿÿNi   (   t   dlopent   dlerrort   RTLD_NOWt   RTLD_GLOBALc            sÞ   g  } ˆ j  j d ƒ r( | j d	 ƒ n> ˆ j  d k rG | j d
 ƒ n ˆ  j d k rf | j d ƒ n  | j d ƒ xd | D]\ } xS | D]K \ } } ˆ  j j | | |  | ƒ } ˆ  j j | ƒ r‡ ˆ  j j | ƒ Sq‡ Wqz Wd  S(   Nt   wint    s   .dllt   darwint   libs   .dylibt   posixs   .so(   R    s   .dll(   R"   s   .dylib(   R"   s   .so(   R    R    (	   t   platformt
   startswitht   appendt   namet   pathR   t   isfilet   abspatht   None(   R'   R(   t   patternt   pthR"   t   dsot   filename(   t   osR   (    s.   lib/python2.7/site-packages/mpi4py/__init__.pyt   lookup_dylibu   s    t   logfilet   mpet   MPE_LOGFILE_PREFIXt   vts   vt-mpis   vt-hybt   VT_FILE_PREFIXR(   s   lib-pmpis   profiler '{0}' not found(   t   warn(   R3   (   R5   s   vt-mpis   vt-hyb(   R   R0   t   dlR   R   R   R   t   popR+   t   environt
   isinstancet   strt   listR(   R   R   R&   R   t
   ValueErrorR   t   profilet   registryt   warningsR7   (   R'   R   R   R   R   R   R1   R2   R(   t   prefixR/   t   handleR7   (    (   R0   R   s.   lib/python2.7/site-packages/mpi4py/__init__.pyR?   d   s4    "N(   t   __doc__t   __version__t
   __author__t   __credits__t   __all__R   R   R   t   Truet
   initializet   threadst   thread_levelR+   t   finalizet   fast_reducet   recv_mprobet   errorst
   __import__t   modulest   __name__R?   R@   (    (    (    s.   lib/python2.7/site-packages/mpi4py/__init__.pyt   <module>   s"   												=