Changes

Jump to: navigation, search

OpenMP Debugging in Visual Studio / Team Debug

24 bytes added, 16:34, 6 December 2017
Case B - Using the Parallel Stacks and the Parallel Watch Window
Setup:
1. After starting debug (F5), open a Parallel Watch Window, and add i into an <Add Watch> column.<br/>
2. Since we also want to see how variable i changes inside each of the functions, on top of the previous breakpoints we placed as in the above walkthrough, we will place more breakpoints, one at each of the return statements in each of the functions. That way we will be able to see the parameter value when it first entered the function, and how it leaves the function.
cilk_spawn foo(i);
At this breakpoint, we can see Main Thread has taken up the spawned thread, and thread id is 111928120.
[[File:Parallelwatch-step1-threads.PNG|500px|center|Synced up]]
In our Parallel Watch window, the thread is active, and we can see that the value of i is 1. When we hover our mouse over the value, we can see the previous value, which is a random int because that was the value before it was initialized.
[[File:Parallelwatch-step1.PNG|500px|center|Synced up]]
 Parallelwatch-step1-threads.PNGAs we keep stepping to the following breakpoints, we
==Case C==
92
edits

Navigation menu