Skip to content

piantado/SimpleMPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

SimpleMPI

A friendly wrapper for mpi4py that allows maps to run on each mpi thread.

Importing MPI_Map.MPI_Map will allow easy parallel mapping:

y = MPI_map(f, range(1500))

where each job is sent to a separate core, when started like:

mpirun -n 4 python MPI_map.py

To time on a simple test:

time mpirun -n 2 python MPI_map.py

time mpirun -n 10 python MPI_map.py

REQUIREMENTS

mpi4py (apt-get install works best when mpich2 is also apt-get installed)
multiprocessing (for parallel buffered i/o on the host)
lockfile

INSTALLATION:

Put this library somewhere--mine lives in /home/piantado/Libraries/SimpleMPI/

Set the PYTHONPATH environment variable to point to SimpleMPI/:

export PYTHONPATH=$PYTHONPATH:/home/piantado/Desktop/Libraries/SimpleMPI

You can put this into your .bashrc file to make it loaded automatically when you open a terminal. On ubuntu and most linux, this is:

echo 'export PYTHONPATH=$PYTHONPATH:/home/piantado/Desktop/Libraries/SimpleMPI' >> ~/.bashrc

And you should be ready to use the library

TODO:

This still has some dependencies with LOTlib (e.g. dprintn) which should be removed!

About

Simple parallel mapping for mpi4py

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages