Visualizing loop parallelization in OpenMP with Mandelbrot

Onion Blog

Syndication

Like Joe, I have been working on Pluralsight's new course on parallel programming with CCS, although my focus has been on using OpenMP, which gives you tools for exploiting shared-memory parallelism. Not a lot of people realize this, but Visual C++ has supported the OpenMP standard since Visual Studio 2005 was released (version 2.0 of OpenMP), and it's remarkably easy to use, especially for parallelizing loops. Currently it does require C++, although Microsoft is working on similar library (Parallel FX) that will be a purely managed solution.

To demonstrate some of the power of OpenMP, I created a managed C++ port of a Winforms Mandelbrot generator written by Ian Griffiths several years ago to demonstrate async callbacks in Winforms. The algorithm for generating Mandelbrot fractals is especially well suited for running in parallel since each row of the generated image is calculated completely independently of the other rows. I've created a short video walking through the sample here:

If you'd like to download the source code and try exploiting the multiple cores on your machine, you can grab the bits here.

Updated: Changed video url


Posted Nov 16 2007, 09:26 AM by fritz-onion
Filed under:

Comments

Daniel Moth wrote re: Visualizing loop parallelization in OpenMP with Mandelbrot
on 11-19-2007 2:01 PM
Is Ian's c# version available at a public URL please?
Fritz Onion wrote re: Visualizing loop parallelization in OpenMP with Mandelbrot
on 11-26-2007 2:42 PM
Yes - Ian has posted a version here:
http://www.interact-sw.co.uk/downloads/WFAsyncFractal.zip

-Fritz

Add a Comment

(required)  
(optional)
(required)  
Remember Me?