Intel Parallel Advisor 2011: Expert Advice For Parallelization
Intel Parallel Advisor Lite has grown up and its newest version is Intel Parallel Advisor 2011. Part of the Parallel Studio 2011 suite of tools, Advisor provides expert advice for parallelization for Windows C/C++ architects and developers.
Intel Parallel Advisor 2011 is also a unique modeling tool that reduces overall development time.
The new Intel Parallel Advisor 2011 is compatible with Visual Studio 2010 and it adds a new toolbar to the IDE (see Figure 1). You can also use Parallel Advisor with Visual Studio 2008 or 2005. If you work with Visual Studio 2010, you will be able to take advantage of the multi-monitor support to keep the Advisor Workflow Window visible while you learn to use the features offered by this interesting tool.
When you click on the Open Advisor button on the Parallel Advisor 2011 toolbar, the IDE displays the Advisor Workflow window, as in Figure 2. This window is integrated into the IDE, and therefore, you don't need to leave Visual Studio to run the different workflow steps.
Once you have your first executable from a C/C++ project, you can start running the following five major workflow steps to model parallelism for your application:
- Survey Target. This step lets you determine the parallelizable hotspots, i.e., the code regions where your application spends most of its time. As a result, you will be able to focus your parallelization efforts on the most time-consuming portions of your application. The results provide a complete call tree and allow you to focus on specific loops. Because long-running loops are typically parallelizable hotspots, the complete call tree allows you to examine these loops.
- Annotate Sources. For each candidate code region, you can use annotations to tell Parallel Advisor 2011 what parallel sites and parallel tasks you propose to parallelize the execution. The process is very simple but it requires some training on the concept of parallel sites that enclose one or more parallel tasks. These annotations propose parallelization mechanisms that tell Parallel Advisor 2011 the model that it must analyze in the next workflow steps.
- Check Suitability. Once you added the annotations, this step allows you to predict the efficiency of the proposed parallelization mechanisms. As a result, you can go back to the previous step to try different parallelization mechanisms. Because you don't need to make the real changes to the code, this test reduces overall development time. The test models your previously added annotations and predicts the results.
- Check Correctness. This is my favorite step. You usually want your parallelized application to run faster, but you also need the new code to provide correctness. This step allows you to predict data sharing problems that can cause undesired side-effects when the code is parallelized according to the annotations. The tool predicts data sharing problems by running the serial version of the application but taking into account the annotations and the future behavior. The results of this test provide a report that allows you to add new annotations to fix the data sharing problems found. These annotations can implement locks. In addition, you can decide to make changes in the source code to avoid sharing unnecessary data and to modify the code that is going to run in parallel tasks. Once you make the necessary changes, you must run the Check Suitability step again and then the Check Correctness step, just to make sure that the new annotations are going to be as efficient as expected.
- Add Parallel Framework. Finally, it is necessary to make the real changes to the code to introduce parallelism by using your favorite framework. Then, it is time to check the results and to run the workflow steps again to identify other hotspots to introduce parallelism, if necessary.
Intel Parallel Advisor 2011 is a great modeling tool. It requires some training to work with the annotations. However, once you get used to these annotations, you usually reduce your development time. In fact, it is difficult to parallelize code again without working with the aforementioned workflow steps. I'd love to see Parallel Advisor for .NET managed languages soon. Having said this, I'll try to get some information about future plans for this modeling tool at Intel Developer Forum 2010.

