To begin using Intel® Advisor, you need to understand the sequence of steps (workflow) associated with converting parts of a serial (single threaded) program to a parallel (multithreaded) program. Intel® Advisor guides you through this sequence of steps to help you decide where to add parallelism to your application program. You use three Intel Advisor tools to run and analyze a serial version of your program to predict its parallel behavior.
By working with the serial version of your program, you quickly locate areas in which parallelism might provide significant performance benefit, as well as fix many data sharing problems before you add parallelism to your program. Thus, you can greatly minimize the work needed when data sharing problems - such as data races - occur in a parallel version of your program. Such problems in a parallel program are often non-deterministic and very difficult to reproduce, locate, and correct without using specialized parallel tools.
The Intel Advisor workflow is based on many years of experience parallelizing numerous programs. There are two representations of this workflow:
The Intel Advisor GUI provides the Advisor XE Workflow tab. This tab presents a simplified workflow to help guide new users.
Once you get familiar with the Advisor XE Workflow tab, you can start using the full Intel Advisor workflow (described later) and adjust its use to your program's specific circumstances.
Both these workflows use these major steps:
- You use the Intel Advisor Survey tool to perform a detailed profile analysis of your running program. The displayed output helps you propose one or several places in your program that could benefit significantly from adding parallelism. The places to add parallelism are called parallel sites and each parallel site must contain one or more parallel tasks. If you have previously tuned programs to minimize their execution time, you may recognize that the Survey tool profiles your running program.
- You use your code editor to insert Intel Advisor annotations into your source code to mark the proposed parallel code regions. These annotations are used by the other Intel Advisor tools. You annotate parallel sites and one or more tasks within each site. Each task provides a performance benefit later when instances of it execute in parallel on multiple cores.
- You use the Intel Advisor Suitability and Correctness tools to perform detailed analysis of your running serial program. These tools use the annotations you inserted into your sources to predict what would happen when running in parallel on multiple cores. They display a report showing the predicted performance gain and parallel overhead (Suitability tool) and the likely data sharing problems (Correctness tool) using the proposed parallel sites and tasks. To experiment with different possible parallel locations, modify your annotations and run these tools again. The displayed output from these tools can help you decide whether to keep the proposed parallel code regions, or propose different regions. After you modify your sources to fix the reported data sharing problems or modify your annotations, run the Correctness and Suitability tools again.
- You use your editor to modify your program's sources to fix data sharing problems. In some cases, data sharing problems are accidental and can be fixed by privatizing the use of certain memory locations. In other cases, you can propose synchronization by inserting lock annotations into your sources to mark the places where you will later add parallel locking code to fix data sharing problems. You must rely on your knowledge of the program's sources and their execution paths to decide the best way to fix the reported data sharing conflicts.
- You use the Intel Advisor Correctness tool again to check whether the likely data sharing problems have been fixed. After you modify your sources to fix the reported data sharing problems, repeat this step until the tool reports that the data sharing problems have been fixed, and then run the Suitability tool again to measure the predicted performance of the modified sources.
- To add parallelism, you use your editor to modify your program's sources to replace annotations with source code from a parallel framework that implements parallelism and locks. For example, you might select the Intel® Threading Building Blocks (Intel® TBB), OpenMP*, or Intel® Cilk™ Plus, which are provided as a part of Intel® Parallel Studio XE, Intel® Cluster Studio XE, or similar Intel software suite products.
After you build and test your parallel program, you use other products in the Intel software suite to examine your running parallel program. These tools help you check, debug, and tune your parallel program.
To view the topics that you can display by clicking links in the Advisor XE Workflow tab, see the topic Advisor XE Workflow Tab Steps (use the link below under See Also). The full workflow steps are presented graphically in the topic Full Workflow Diagram.