Parallel Computing

Konrad Hinsen hinsen at cnrs-orleans.fr
Fri Dec 8 06:05:03 EST 2000


Curtis Jensen <cjensen at bioeng.ucsd.edu> writes:

> I haven't had much luck on finding anything about parallel computing via
> Python.  Does Python support this?  Or do we just need to write a C
> module to run parallel code?  Thanks.

It depends on what you mean exactly by "parallel code", but I suppose
that for most interpretations the answer is that you can do it in
Python using existing modules.

I'll limit myself to the kind of parallel computing that I do myself,
which is algorithm parallelization implemented via MPI. Version 2.1 of
ScientificPython (available at
ftp://dirac.cnrs-orleans.fr/ScientificPython/) contains an interface
to the most commonly used MPI functions plus the necessary
infrastructure to make Python run as an MPI application, and to permit
C extension modules to use MPI as well without linking to it
(important if you use dynamic libraries). With this package, you can
use MPI in Python in exactly the same way you would do in C or
Fortran. The data objects that can be passed between processes are
NumPy arrays and strings.

However, most real-life parallel code will also contain C code for
speed; you wouldn't use a parallel machine if speed weren't important.
But you can end up with an efficient program in which most code is
Python. For an example, see the development releases (2.1.x) of the
Molecular Modelling Toolkit (available at
ftp://dirac.cnrs-orleans.fr/MMTK/).

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------



More information about the Python-list mailing list