Intel® Advisor Help
The
Intel® Advisor Dependencies tool
runs your annotated target and watches its memory access operations to predict possible parallel data sharing problems. To prepare your target program, see
Minimizing Data Collection Result Size and Execution Time (Dependencies) and
Before Running the Dependencies Tool.
You can run the Dependencies tool to collect predicted parallel dependencies data:
Within the Intel Advisor GUI by using the Tools menu, the Advisor Workflow tab, or the toolbar icons after you open a project.
Using the advixe-cl command line, by specifying the --collect option after you open a project.
Similarly, you can view the collected data in the Dependencies Report and related windows by using the standalone GUI or the command line.
Use the Dependencies tool before you have modified your serial program to use parallel execution. By observing the data accesses and the annotations during execution, it knows which tasks the accesses are in. The data collected and analyzed appears in the Dependencies Report window. You can find bugs before they happen - you do not have to wait for your parallel program to fail and then debug it. As you fix the detected problems, rebuild your application and run the Dependencies tool again. When the Dependencies tool does not detect any Problems, a No Problems Detected message appears instead of the Dependencies Report.
When you write a serial program, you know the order in which its operations will execute. When you create two tasks within that program and execute them in parallel, any operation in either task can execute before, after, or simultaneously with any operation in the other task (or an instance of the same task). Errors occur when two tasks that are executing simultaneously contain operations that access the same memory location. If one of them writes to the location and the other one reads from it, then the result of the read depends on whether it happens before or after the write. If they both write to the location, then the final value in the location depends on which write happens last.
These errors are called data sharing problems. They are also sometimes referred to as conflicts, or data races, because the behavior of the program depends on which operation gets to the data first, or as data dependencies, because the result of executing a data access operation depends on other operations that have previously accessed the same data.
A correct parallel program is expected to be reliable, and typically deterministic in the output it produces. The problem with parallel data sharing problems is that they are non-deterministic. This rearrangement of the order of operations can easily change the behavior of the program. Since the order of operations may be different every time the program is executed, the resulting errors can be hard to reproduce, and even harder to debug. A program may execute perfectly 100 times; then, the next time, one task runs a little bit faster, and reads from an object on the heap before it has been written by another task. Or when you add some print statements or use the debugger, the task slows down and the bug disappears.
After you change annotations or fix data sharing problems, run the Dependencies tool again to check the modified program. In addition to data sharing problems, the Dependencies tool can predict other problems, such as mismatched annotations pairs and lock-related warnings such as a deadlock. Run this tool until the predicted problems have been fixed. After you fix the data sharing problems, run the Suitability tool again to check your program's predicted performance characteristics.
To catch the most data sharing problems, run the Dependencies tool on your annotated serial program and the Intel® Inspector on your parallel program. As it examines your annotated serial program, the Dependencies tool will not detect and report all possible sharing problems. After you have modified your program to run in parallel, use Intel® Inspector to check for problems. Because Intel® Inspector observes the program running in parallel, it can detect some sharing problems that the Dependencies tool will not detect. For information on kinds of sharing problems that Intel Advisor will not report, see the help topic Dependencies Tool Limitations.