Changes

Jump to: navigation, search

OpenMP Debugging in Visual Studio / Team Debug

696 bytes added, 16:45, 6 December 2017
Case B - Using the Parallel Stacks and the Parallel Watch Window
[[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|500px200px|center|Synced up]]
As Second Function Call: cilk_spawn coo(i); When we keep stepping arrive at the breakpoint of the next function call, we can see thread 20168 in the Parallel Watch window. If we refer back to the following breakpointsThread window, wecan see that this is Worker 2.[[File:Parallelwatch-step2.PNG|200px|center|Synced up]]The stack frame is based on the main method, so we see the Main Thread's i value, which is 1; meanwhile, Worker 2's i value hadn't been set yet at this point in the stack frame.But when we continue to the next breakpoint, which if we look at the Call Stack Window, we can see the cilk_spawn call being executed, the i value is set to 1.  [[File:Parallelwatch-step2-callstack.PNG|300px|center|Synced up]][[File:Parallelwatch-step2b.PNG|200px|center|Synced up]]
==Case C==
92
edits

Navigation menu