Programs for assessing the efficiency of Python in scientific computing
This page contains a set of programs used to perform the numerical
tests in the paper
On the Performance of the Python Programming Language for
Serial and Parallel Scientific Computing by X. Cai, H. P. Langtangen,
H. Moe.
You can download the test programs and run them in your own computer
environment.
- section2_examples.py runs all the
tests in Section 2 of the paper. Some functions in
this Python script make use of
the floops and cloops extension modules (see below)
as well as of the external modules psyco and weave.
- floops.f: Fortran 77 code with loops to
be called from the section2_examples.py script.
You may build the Fortran extension module using the
loops.sh Bourne shell script (or use the statements
in that script as a starting point for a build process).
- cloops.c: C code with loops to
be called from the section2_examples.py script.
You may build the C extension module using the
loops.sh Bourne shell script (or use the statements
in that script as a starting point for a build process).
- stencil_pure_f.f: stand-alone
Fortran 77 code for computing the action of a 3D stencil (called
by section2_examples.py for comparison with mixed-language
Python-C/F77 implementations).
- stencil_pure_c.c: stand-alone
C code for computing the action of a 3D stencil
(called
by section2_examples.py for comparison with mixed-language
Python-C/F77 implementations).
- stencil_pure.sh: Simple Bourne shell
script for compiling the stand-alone programs
stencil_pure_f.f and stencil_pure_c.c.
To run section2_examples.py, you need the following Python
modules:
Numeric,
numarray,
psyco, and
weave.