Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 6aebace0cb967559ef14fc69ac903937 > files > 286

python-mpi4py-doc-1.3.1-4.mga4.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Introduction &mdash; MPI for Python 1.3.1 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '1.3.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="MPI for Python 1.3.1 documentation" href="index.html" />
    <link rel="next" title="Design and Interface Overview" href="mpi4py.html" />
    <link rel="prev" title="MPI for Python" href="index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="mpi4py.html" title="Design and Interface Overview"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="index.html" title="MPI for Python"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">MPI for Python 1.3.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="introduction">
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
<p>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 <a class="reference external" href="http://www.beowulf.org/">Beowulf</a> class clusters and cluster of workstations.</p>
<p>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&#8217;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.</p>
<p>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.</p>
<p>For implementing general-purpose numerical computations, MATLAB <a class="footnote-reference" href="#id2" id="id1">[1]</a>
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 &#8220;look and feel&#8221; in
Python scripts.</p>
<table class="docutils footnote" frame="void" id="id2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>MATLAB is a registered trademark of The MathWorks, Inc.</td></tr>
</tbody>
</table>
<div class="section" id="what-is-mpi">
<h2>What is MPI?<a class="headerlink" href="#what-is-mpi" title="Permalink to this headline">¶</a></h2>
<p><a class="reference external" href="http://www.mpi-forum.org/">MPI</a>, <a class="reference internal" href="#mpi-using">[mpi-using]</a> <a class="reference internal" href="#mpi-ref">[mpi-ref]</a> the <em>Message Passing Interface</em>, 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++).</p>
<p>Since its release, the MPI specification <a class="reference internal" href="#mpi-std1">[mpi-std1]</a> <a class="reference internal" href="#mpi-std2">[mpi-std2]</a> 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 <a class="reference external" href="http://www.mcs.anl.gov/research/projects/mpich2/">MPICH</a> <a class="reference internal" href="#mpi-mpich">[mpi-mpich]</a>, <a class="reference external" href="http://www.open-mpi.org/">Open MPI</a> <a class="reference internal" href="#mpi-openmpi">[mpi-openmpi]</a> or <a class="reference external" href="http://www.lam-mpi.org/">LAM</a>
<a class="reference internal" href="#mpi-lammpi">[mpi-lammpi]</a>.</p>
</div>
<div class="section" id="what-is-python">
<h2>What is Python?<a class="headerlink" href="#what-is-python" title="Permalink to this headline">¶</a></h2>
<p><a class="reference external" href="http://www.python.org/">Python</a> 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&#8217;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.</p>
<p>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.</p>
<p>Python is an ideal candidate for writing the higher-level parts of
large-scale scientific applications <a class="reference internal" href="#hinsen97">[Hinsen97]</a> and driving
simulations in parallel architectures <a class="reference internal" href="#beazley97">[Beazley97]</a> like clusters of
PC&#8217;s or SMP&#8217;s. Python codes are quickly developed, easily maintained,
and can achieve a high degree of integration with other libraries
written in compiled languages.</p>
</div>
<div class="section" id="related-projects">
<h2>Related Projects<a class="headerlink" href="#related-projects" title="Permalink to this headline">¶</a></h2>
<p>As this work started and evolved, some ideas were borrowed from well
known MPI and Python related open source projects from the Internet.</p>
<ul class="simple">
<li><a class="reference external" href="http://www.osl.iu.edu/research/oompi/">OOMPI</a><ul>
<li>It has not relation with Python, but is an excellent object
oriented approach to MPI.</li>
<li>It is a C++ class library specification layered on top of the C
bindings that encapsulates MPI into a functional class hierarchy.</li>
<li>It provides a flexible and intuitive interface by adding some
abstractions, like <em>Ports</em> and <em>Messages</em>, which enrich and
simplify the syntax.</li>
</ul>
</li>
<li><a class="reference external" href="http://pypar.googlecode.com/">Pypar</a><ul>
<li>Its interface is rather minimal. There is no support for
communicators or process topologies.</li>
<li>It does not require the Python interpreter to be modified or
recompiled, but does not permit interactive parallel runs.</li>
<li>General (<em>picklable</em>) Python objects of any type can be
communicated. There is good support for numeric arrays,
practically full MPI bandwidth can be achieved.</li>
</ul>
</li>
<li><a class="reference external" href="http://sourceforge.net/projects/pympi/">pyMPI</a><ul>
<li>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.</li>
<li>It provides an interface suitable for basic parallel programing.
There is not full support for defining new communicators or process
topologies.</li>
<li>General (picklable) Python objects can be messaged between
processors. There is not support for numeric arrays.</li>
</ul>
</li>
<li><a class="reference external" href="http://dirac.cnrs-orleans.fr/plone/software/scientificpython/">Scientific Python</a><ul>
<li>It provides a collection of Python modules that are
useful for scientific computing.</li>
<li>There is an interface to MPI and BSP (<em>Bulk Synchronous Parallel
programming</em>).</li>
<li>The interface is simple but incomplete and does not resemble
the MPI specification. There is support for numeric arrays.</li>
</ul>
</li>
</ul>
<p>Additionally, we would like to mention some available tools for
scientific computing and software development with Python.</p>
<ul class="simple">
<li><a class="reference external" href="http://numpy.scipy.org/">NumPy</a> 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.</li>
<li><a class="reference external" href="http://www.scipy.org/">SciPy</a> 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.</li>
<li><a class="reference external" href="http://www.cython.org/">Cython</a> 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.</li>
<li><a class="reference external" href="http://www.swig.org/">SWIG</a> 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.</li>
</ul>
<table class="docutils citation" frame="void" id="mpi-std1" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id5">[mpi-std1]</a></td><td>MPI Forum. MPI: A Message Passing Interface Standard.
International Journal of Supercomputer Applications, volume 8,
number 3-4, pages 159-416, 1994.</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="mpi-std2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id6">[mpi-std2]</a></td><td>MPI Forum. MPI: A Message Passing Interface Standard.
High Performance Computing Applications, volume 12, number 1-2,
pages 1-299, 1998.</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="mpi-using" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id3">[mpi-using]</a></td><td>William Gropp, Ewing Lusk, and Anthony Skjellum.  Using
MPI: portable parallel programming with the message-passing
interface.  MIT Press, 1994.</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="mpi-ref" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id4">[mpi-ref]</a></td><td>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.</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="mpi-mpich" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id7">[mpi-mpich]</a></td><td>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.</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="mpi-openmpi" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id8">[mpi-openmpi]</a></td><td>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&#8217; Group Meeting, Budapest, Hungary, September 2004.</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="mpi-lammpi" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id9">[mpi-lammpi]</a></td><td>Greg Burns, Raja Daoud, and James Vaigl.  LAM: An Open
Cluster Environment for MPI. In Proceedings of Supercomputing
Symposium, pages 379-386, 1994.</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="hinsen97" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id10">[Hinsen97]</a></td><td>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.</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="beazley97" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id11">[Beazley97]</a></td><td>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.</td></tr>
</tbody>
</table>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Introduction</a><ul>
<li><a class="reference internal" href="#what-is-mpi">What is MPI?</a></li>
<li><a class="reference internal" href="#what-is-python">What is Python?</a></li>
<li><a class="reference internal" href="#related-projects">Related Projects</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">MPI for Python</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="mpi4py.html"
                        title="next chapter">Design and Interface Overview</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/intro.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="mpi4py.html" title="Design and Interface Overview"
             >next</a></li>
        <li class="right" >
          <a href="index.html" title="MPI for Python"
             >previous</a> |</li>
        <li><a href="index.html">MPI for Python 1.3.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2013, Lisandro Dalcin.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>