IDF 2010: Five steps to parallel programming heaven

Last week at IDF, James Reinders (evangelist for Intel’s software and services group) delivered a presentation in partnership with Steve Teixeira (Product Unit Manager, Parallel Computing Platform Developer Division, Microsoft) to show how Intel tools and Microsoft’s Visual Studio work well together. The key lesson, Teixeira said, was that the paradigms used in both are similar, so that developers can converge on a small set of abstractions.

You can see the slides online now, although the online presentation doesn’t include the demonstrations. The main thing I wanted to share from the session was the way that Intel Parallel Advisor uses a wizard-like approach to make it easier to parallelise programs. You might remember that Intel Parallel Advisor is now part of Intel Parallel Studio, after graduating from being an experimental Lite product.

There are five steps to using Parallel Advisor, shown on the left of the screen (see screenshot, below):

  1. Survey the target. This helps you to identify areas such as loops where parallelising might deliver quick wins.
  2. Annotate the source. The idea is that you add some annotations to indicate your intention to parallelise. This enables you to prototype your parallel algorithms without getting bogged down in coding first.
  3. Check suitability. This models the effectiveness of the parallel annotations, and uses a graph to show the results compared to the perfect speedup you might expect based on the number of cores available. This also helps by suggesting ways that the speedup could be improved. In the photo below, for example, the software suggests enabling task chunking, and points out that a near perfect speedup can be achieved by doing so. (You can click to enlarge the photo).
  4. Check correctness. This uses the same technology as Intel Parallel Inspector to analyse the annotated source and identify any deadlocks and race conditions. If it finds any, you can click to go straight to the affected source. In the demonstration, a global variable was highlighted, so an annotation was added to say that it would be locked and then the correctness test was run again.
  5. The final step is to add the parallel framework. The process works at a level of abstraction that enables you to be framework-agnostic and to quickly prototype without having to work with code.
Intel Parallel Advisor running in Visual Studio

Intel Parallel Advisor running in Visual Studio

A separate demonstration showed how Visual Studio’s parallel stacks present a flow-chart-like diagram of the code execution, highlighting any deadlocks with intuitive red icons. The Concurrency Visualiser enables you to see what different threads were doing by time, so you can identify any that finish early and don’t steal work from others.

It was interesting to see the extent to which the tools are becoming more visual and bringing analysis and insight to the programming workflow. What other ways do you think tools could help you to visualise what goes on under the hood of your apps?

Leave a Reply

Please log in using one of these methods to post your comment:

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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: