Transitioning to Python from Matlab – Day 2


A great limit to Matlab the very high price for both individual licenses and distributed/parallel computing toolbox. To this python already has several good alternatives. That said, the documentation and capabilities of these options is highly convoluted.

Parallel Python

Parallel Python (PP) is a great start in getting code to run in several computers. It works on a versatile client/server model, where generic servers must be launched to do the actual computations and the user must right a client which interacts with the several servers. The nice thing about this module is how fast you are up and running. Basically you pass arguments, and a function pointer to PP and it handles the distribution and gathering of results. Load balancing, passing extra data, and anything that can’t be done with a single function will be outside the realm of this module.


MPI is something that I never used, the documentation is sparing, and overall very mysterious. That said, the potential is great. There are several MPI implementations for Python, and I picked this one because it seemed the easiest to install and start using. Essentially when using MPI4Py your script is called in parallel on multiple CPU cores and/or computers and the MPI element makes sure that all the instances talk to each other. What is cool is that variables in your program are both local to an instance, but at the same time can be shared seamlessly with your other instances. The documentation is very good, but the actual MPI standards are very odd and worth learning more about particularly because it can be used with computer clusters.