Analyzing in Parallel
=====================

Right now, analyzing in parallel is a tricky business.  With the next major
release of yt, we intend to include a significantly improved infrastructure for
dispatching analysis via a queuing system.

Projecting in Parallel
----------------------

Below is a script (``parallel_projection_mpi4py.py``) that shows a
proof-of-concept parallel projection.  It relies on `MPI4Py
<http://mpi4py.scipy.org/>`_ and `PyTables <http://www.pytables.org/>`_, and
currently only works with a decomposition onto a square number of processors.

.. literalinclude:: ../../../examples/parallel_projection_mpi4py.py
   :language: python
   :linenos:

Analyzing Objects in Parallel
-----------------------------

The process of analyzing objects in parallel if they don't require in-line data
comparison -- for example, creating phase diagrams of multiple galaxies in a
large scale cosmological simulation -- is significantly simpler, and can be
conducted in a very straightforward fashion.

The below example takes a list of HOP centers, generated by yt and then written
out with the :meth:`write_out` method, reads them in and then chooses which one
to examine based on the processor number.  Note that MPI4Py might be overkill
here, but it suffices for our purposes.

.. literalinclude:: ../../../examples/parallel_galaxy_analysis.py
   :language: python
   :linenos:
