Changes

Jump to: navigation, search

GPU621/OpenMP Debugging

133 bytes added, 04:44, 9 December 2021
Case B - Using the Parallel Stacks and the Parallel Watch Window
}
</syntaxhighlight>
 
 
The main program calls the print function for the size of the string vector.
'''Setup:'''
 
Set breakpoints at the definition of the function, and when join() is called.
Debug using F5 or by clicking debug from the top menu bar.
 Here is the '''output ''' of the program: 
<syntaxhighlight lang="bash">
0 : Hello World
There are 9 different threads that were being created and used every time print() is called.
Using Parallel Stacks Windows, we are able to see the call stack information through a UI.
 
 
----
'''Walkthrough:'''
First call Call: <br/>
[[File:parallelstackswalkthrough1.png]]
 
<br/>
It is being called at the definition of the function "print()"
<br/><br/>
The yellow arrow means the currently executing thread.
By advancing more threads,
<br/><br/>
[[File:parallelstackswalkthrough2.png]]
<br/><br/>
more threads are created by the system.
<br/><br/>
[[File:parallelstackswalkthrough3.png]]
<br/><br/>
When triggering the method view, it shows the related threads
[[File:parallelstackswalkthrough4.png]]
<br/><br/>
[[File:parallelstackswalkthrough5.png||1000px]]
<br/><br/>
Indicates the current thread that is being processed, and also lists the other threads.
In the left bottom, shows the value of the current thread's n(number), and its string(which is "a testing" in the picture)
<br/><br/>
Forked threads are being joined after their usage.
<br/><br/>
[[File:parallelstackswalkthrough6.png]]
<br/><br/>
49
edits

Navigation menu