Matlab 2010a has been recently released, and finally the student version has the Parallel Computing Toolbox available for purchase as an option. I’ve been waiting to play with this for several years.
I document in the PDF below my initial experiments with the toolbox. Specifically, I look into a simple, parallelizable task, that of interpolating commodity futures curves, when we often want to interpolate many days’ curves. Each can be processed independently of the others.
I document a basic way of parallelising this algorithm in Matlab, what kind of speedups to expect using the ‘parfor’ syntax, and the risk of significant slowdown if care is not taken.
I also manage to make the software completely backwards compatible, so it can be shared with those who don’t have the parallel computing toolbox.
Finally, I show a way of making intelligent libraries. For small sized problems, they will execute in serial, because the parallel method imposes big overheads. For larger problem sizes, they will switch to parallel mode.
The PDF includes all the nececessary Matlab software (‘codes’) for others to duplicates these results.
Any comments would be very welcome. I am going to be using the parallel features of Matlab more in coming weeks. It’s good practise, as we seem mainstream 4, 8 and soon 12 core desktops. I have also been experimenting with using CUDA on Matlab, and can recommend the ‘gp-you’ toolbox, which makes CUDA on Matlab easy to learn. It’s yet to be a full-power toolbox though, and is missing things like random number generation on the GPU, essential for monte-carlo simulations.