How to Use the Summary in Intel Parallel Advisor 2011 to Make Informed Decisions

In order to efficiently add parallelism to existing code, it is important to gather the best possible data about the application and use it to manage expectations and developer workloads intelligently.  The Summary Report in Intel® Parallel Advisor 2011 (Advisor) provides this information in an easy-to-read format.

After profiling code with the Advisor's Survey tool, Figure 1 shows the breakdown of time spent in functions and loops in the application.

Survey Report
Figure 1

There are two loops in two different functions that are consuming most of the run time, chainedSeed() and orderedSeed().  Figure 2 shows the code for these functions.

Function Source
Figure 2

Both functions are populating an array in a for loop whose iterations may be parallelizable. Figure 3 shows the functions after adding Advisor Annotations.

Annotated Code
Figure 3
After Advisor Suitability and Correctness modeling tools have been run on the annotated code, the Summary Report (Figure 4) combines the information from both tools, to help users make informed decisions about how to proceed with parallelizing their code.

Summary Report
Figure 4

Figure 4 shows that both sites have the possibility of near-linear speedup on two cores (Maximum Self Gain = 1.99x).  It also shows that the ChainedSeedSite has a correctness issue, while the OrderedSeedSite is free of correctness issues. The suitability and correctness data summarized here aid the decision making process when considering how to move forward with adding parallelism.  Parallelizing both sites would improve speedup similarly. However, it may be less trouble to parallelize the OrderedSeedSite because there are no glaring correctness issues to fix.  Having this program-wide performance and correctness information and using it properly, can greatly reduce wasted time and effort to parallelize code that is very difficult or almost impossible to thread.

1. By installing or copying all or any part of the software components in this site, you agree to the terms of the Intel Sample Source Code License Agreement.
2. By accessing and using the Intel Corporation Web Sites and Materials, you acknowledge and agree to abide by the following Terms of Use.