| August 30, 2010 9:00 PM PDT | |
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(r) 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.

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.

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.

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.

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.
After profiling code with the Advisor's Survey tool, Figure 1 shows the breakdown of time spent in functions and loops in the application.
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.
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.
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.
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.
Do you need more help?
This article applies to: Parallel Programming, Intel® Parallel Advisor Knowledge Base
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (0) 
Trackbacks (0)
Leave a comment 
To obtain technical support, please go to Software Support.

