Navigation Menu

Skip to content

steder/maroonmpi

Repository files navigation

  1. summary Overview of MaroonMPI Features (Out of date!)
  2. labels Featured,Phase-Requirements

Table of Contents

MaroonMPI Features

Features

MMPI has the following features:


Mis-features

MMPI has the following problems:

 * Similar syntax to C and Fortran MPI libraries
 * Not all MPI functions are implemented
 * Not all Collective Operations are implemented (MAX_LOC, MIN_LOC)
 * Needs more tests and more thorough documentation

New Pythonic Style

MMPI now has a new default style that wraps the original low level function interface. This interface's goal is:

 * more "pythonic" rather then C style
 * Type arguments are no longer required / supported for the majority of functions
 * Length arguments are no longer required / supported for the majority of functions
 * Tags, communicators, "root" arguments are now optional
 * Single elements are no longer received as 1-element arrays but properly returned as single elements.
 * Arrays are now properly sent
 * More advanced collective operations are supported
 * Communicators now support more MPI operations as member functions.

Original Syntax

Here's a quick example of an oldstyle hello world program using the new MMPI module

New Syntax

Now let's try it again with the new interface


New PyMPI-style Interface

Original "core" Interface

MMPI and PyMPI

PyMPI is an excellent MPI solution for Python. Due to some problems with support for MPMD and Interfacing with C/Fortran Extensions that use MPI I ended up working on MMPI as an alternative.

I'm currently working to implement all of the nice syntactic sugar of PyMPI while keeping the C code base as simple as possible. I have been extending MMPI pretty much exclusively in Python, which has allowed me to make large changes to the behavior of MMPI quickly and easily. This also makes MMPI easier for other people to customize.

Currently the major difference between PyMPI and MMPI is the syntax. The following table illustrates some of these differences. Note how MMPI syntax is very similar to C/Fortran MPI.

|| || PyMPI || MMPI || || Initialization || None* || rank,size = mpi.init( [len(sys.argv),sys.argv]** ) || || Finding rank or size of a process || myrank = mpi.rank || myrank = mpi.comm_rank(Communicator) || || Send || mpi.send(data,0[,0]**) || mpi.send(data,len(data),type,0,0,comm) || || Comm Split || mpi.WORLD.split(color[,key]**) || mpi.comm_split(color,key,mpi.MPI_COMM_WORLD) ||

  • PyMPI Initializes MPI when the interpreter starts up
    • [] denote optional arguments
© m. steder (2006)

About

Python bindings to MPI (MPICH2) with Support for Numpy Arrays

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published