Tutorial: Where to Add Parallelism with Intel® Advisor 2015 and a C/C++ Sample

Predict Parallel Data Sharing Problems

To predict parallel data sharing problems in your target based on the added Intel Advisor annotations:

Each step is described more fully below.

Build Target in Debug Mode and Test

  1. Build the target in debug mode:

    • In the terminal session, change directory to the nqueens_Advisor/ directory (where the zipped sample files were extracted to).

    • Type make 1_nqueens_serial_debug to build the target in debug mode.

  2. Test the target:

    • In the terminal session, type ./1_nqueens_serial_debug 8 to execute the application using a reduced chessboard size to minimize execution time.

    • Notice the application output window displays a board size of 8.

Change Intel Advisor Project Properties

  1. In the Intel Advisor GUI, choose File > Project Properties....

  2. In the Analysis Target tab:

    • Change the Target type drop-down to Correctness Analysis.

    • Click the Browse... button next to the Application field and choose the nqueens_advisor/1_nqueens_serial_debug file.

    • Set the Application parameters field to 8. This reduces the size of the chess board to minimize execution time.

  3. Click the OK button to save the changes.

Collect Correctness Data

Under 4. Check Correctness in the Advisor Workflow, click the Collect Correctness Data button button to collect Correctness data while the target executes.

During the Correctness analysis, the Intel Advisor displays a window similar to the following.
Collect correctness data window

View Correctness Report

After the Correctness tool finalizes the data, the Intel Advisor displays a window similar to the following.
Correctness Report window

1

The Problems and Messages pane lists the detected messages and potential data sharing problems: A Data communication problem and a Memory reuse problem. The severity of each problem or message is indicated by the following icons: for error, for warning, or for informational remark. Clicking a problem or message row displays more information about it in the Code Locations pane. Try clicking the Data communication row now.

2

The Filter pane lets you temporarily limit the problems and messages displayed in the Problems and Messages pane to those that meet specific criteria.

3

Problems in parallel programming usually involve multiple, interrelated code regions. The Code Locations pane shows a code snippet from each involved code region.

If you need to dig deeper into a data sharing problem, you can double-click the associated row in the Problems and Messages pane to display a Correctness Source window where you can:

View Summary Window

Click Summary on the navigation toolbar to re-open the Summary window. Notice the Intel Advisor added even more data to this dashboard to help you weigh the predicted maximum speedup benefit against the cost of fixing sharing problems for your sites and tasks.
Summary window

1

Notice the question marks have been replaced with a Correctness Problems summary: Two problems with a severity of error and no problems with a severity of warning.

2

You now have collection data from all three Intel Advisor analysis tools. Congratulations!

Key Terms

data race, synchronization

Next Step

Fix Data Sharing Problems


Submit feedback on this help topic