gstlal-inspiral  0.4.2
 All Classes Namespaces Files Functions Variables Pages
List of all members | Public Member Functions | Public Attributes
emcee.utils.MPIPool Class Reference

Public Member Functions

def __init__
def is_master
def wait
def map
def close
def __enter__
def __exit__

Public Attributes

 comm
 rank
 size
 debug
 function

Detailed Description

A pool that distributes tasks over a set of MPI processes. MPI is an
API for distributed memory parallelism.  This pool will let you run
emcee without shared memory, letting you use much larger machines
with emcee.

The pool only support the :func:`map` method at the moment because
this is the only functionality that emcee needs. That being said,
this pool is fairly general and it could be used for other purposes.

Contributed by `Joe Zuntz <https://github.com/joezuntz>`_.

:param comm: (optional)
    The ``mpi4py`` communicator.

:param debug: (optional)
    If ``True``, print out a lot of status updates at each step.

Definition at line 63 of file utils.py.

Member Function Documentation

def emcee.utils.MPIPool.close (   self)
Just send a message off to all the pool members which contains
the special :class:`_close_pool_message` sentinel.

Definition at line 207 of file utils.py.

def emcee.utils.MPIPool.is_master (   self)
Is the current process the master?

Definition at line 94 of file utils.py.

def emcee.utils.MPIPool.map (   self,
  function,
  tasks 
)
Like the built-in :func:`map` function, apply a function to all
of the values in a list and return the list of results.

:param function:
    The function to apply to the list.

:param tasks:
    The list of elements.

Definition at line 147 of file utils.py.

def emcee.utils.MPIPool.wait (   self)
If this isn't the master process, wait for instructions.

Definition at line 101 of file utils.py.


The documentation for this class was generated from the following file: