jump to navigation

Can Toolkits Make Programming for Parallel Processing Unnecessary? January 18, 2010

Posted by Peter Varhol in Software development, Software tools.

Programming for multi-processor and multi-core systems remains a challenging endeavor.  I’ve discussed several approaches that vendors have offered to be enable developers to more easily create code that can partition itself onto multiple processors or cores.

But in most of the cases the approach requires an understanding of how to analyze a program structure and write code so that segments can be executed independently.  Toolkits such as Intel’s Parallel Studio, Nvidia’s Nexus (specifically for Nvidia graphics processing units), and Mitrionics C can help, but still require a high level of skill by the programmer.  And these toolkits don’t exactly take over all of the work for you; you still need to intimately understand the application and what it takes to execute some of the code in parallel.

Late last week I talked to Silvina Grad-Freilich, parallel computing manager at The Math Works for MATLAB, the mathematics and engineering, about a series of announcements made by the parallel computing group around the time of Supercomputing 2009 (the third week of November).  Scientists, mathematicians, and engineers have a lot of computations that can potentially run in parallel, and increasingly need to take advantage of multi-core desktop and cluster computing power.

A bit more than a year ago, the MATLAB folks told me that you could use the MatLAB language to be able to execute certain code segments in parallel.  Specifically, MATLAB offered the ability to take an existing program that ran on the desktop, and wrap certain portions of that program in a construct known as a PAR FOR.  This code will automatically be partitioned by the compiler and run on any number of processors or cores available.

Of course, you had to identify the code that could run in parallel (a matrix or a FOR loop, for example), and insert the PAR FOR.  Now the MATLAB parallel toolkit will automatically identify those parts of a MATLAB program that can execute simultaneously, and run it on however many number of processors or cores are available (in practice, I believe there is a limit of 8 or 16 processors or cores).

The caveat is, of course, that it only works for MATLAB code.  If you call other languages, or have your MATLAB code embedded in another language, the toolkit won’t automatically parallelize that other language.

MATLAB is a very specialized programming environment for a particular type of user, and it is unreasonable to think that the approach taken by The Math Works parallel toolkit will work with more general-purposes languages.  How can a general-purpose toolkit provider imagine all of the circumstances where an arbitrary program could execute code in parallel, and identify those circumstances within a vast array of code?

Still, it is a worthwhile endeavor and goal, wouldn’t you say?



1. Do We Care About Writing Parallel Code? « Cutting Edge Computing - January 19, 2010

[…] January 19, 2010 Posted by pvarhol in Software development, Strategy. trackback My writings on developing code to run in parallel beg the question of just how important is the ability for […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: