Storage Informer
Storage Informer

How to model parallelism with Intel Parallel Advisor Lite

by on Aug.18, 2009, under Storage

How to model parallelism with Intel® Parallel Advisor Lite

Did you know that Intel® Parallel Advisor Lite offers you the ability to prototype (model) parallelism in your serial application? It lets you scope the effort of parallelizing your application while continuing to use your existing test system and debugging tools as you make source modifications to avoid data sharing issues.

To model potential parallelism, you insert Parallel Advisor Lite annotations into your source code to mark your tentative decisions about your program&aposs parallel task structure. Annotations are textual hints that will not cause compilation or link-time errors when you are not building for Parallel Advisor Lite or when the Parallel Advisor Lite libraries are not found on your system. By using annotations, you avoid having dependencies on particular compilers or parallel constructs.

How to proceed…

  1. Start by identifying likely locations to add parallelism with the use of a profiling tool.
    Using a Release configuration built with debug information, launch the Parallel Advisor Lite profile tool:
  2. Create a new header file that is initialized with the Parallel Advisor Lite Annotation definitions and include it
  3. Insert task annotations around a block of code that will execute as a task (red arrows below), then insert the site annotations around the task(s) that you want to execute in parallel with one another (blue arrows below). For example:
  4. Build your project configurations as before (release configuration with debug information)
  5. Confirm that the annotated sites and tasks have potential performance gains. This requires some manual effort since Parallel Advisor Lite does not provide a tool for this step.
    The process of how to evaluate the performance impact can be found in our help documentation.
  6. Using a Debug configuration (with debug information) and a small representative data set, run the Parallel Advisor Lite Correctness Modeling tool to evaluate data accesses that occur within the annotated regions. Depending on the data observations reported, you may be required to insert annotations to model locking of a data access or model a “critical region” or consider larger changes to your source pool…

Once you achieve a clean Correctness Modeling run, you have the choice of replacing annotations with the parallel constructs (creating a parallel program) or looking for another region to prototype. You will be able to exploit the full potential of the Intel® Parallel Studio tools now that you have parallelized your application, such as using Intel(R) Parallel Amplifier to improve concurrency or Intel(R) Parallel Inspector to check for threading errors.

For more information about where and when to insert annotations can be found in our Parallel Advisor Lite help Task Organization and Annotations and in our Annotation Reference sections.

Note: Our annotate.h includes windows.h. This is due to combining what would typically be found in an annotate.h/.cpp file pair into a single file. Unfortunately, this inclusion can result in unexpected compilation errors when your application already includes windows.h. You can sidestep this issue by defining “WIN32_LEAN_AND_MEAN” as shown below


:, , , , , , , ,

Leave a Reply

Powered by WP Hashcash

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...