Open main menu

CDOT Wiki β

GPU621/Striking

Revision as of 12:38, 8 December 2016 by EunJu Han (talk | contribs) (Progress)

Striking

Our project: Debugging Threads in Intel Parallel Studio

Group Members

  1. Eunju Han [1] Research etc.
  2. Lei(Eric) Zhang [2] (Dropped the course) Research etc.

Progress

Oct 17th:

  1. Picked topic
  2. Picked presentation date.

Oct 20th:

  1. Created Wiki page

Nov 6th - 13th:

  • There are great resources about Intel Parallel Debugger Extension for Microsoft Visual Studio like below.
  1. Debugging Threads in Intel Parallel Studio - [Dr. Dobbs Article]
  2. Intel® Parallel Debugger Extension, Added Aug 2, 2012 - [[3]]
  3. Intel Parallel Composer Parallel Debugger Extension Tutorial - [Mittie Sylvian's Video]

However, Intel Parallel Debugger Extension has been deprecated from the version Intel Composer XE 2013 at the end of 2012. I have noticed this from the Intel User Forum.

Nov 14th - 23th:

  • Links about Debug Multithreaded Applications in Visual Studio
  1. How to: Use the Threads Window
  2. How to: Use the Parallel Watch Window
  3. Using the Parallel Stacks Window
    • Main features descriptions in Parallel Stacks window
 
alt text
Callout LetterElement NameDescription
ACall Stack Segment or NodeContains a series of method contexts for one or more threads.
BBlue HighlightPresent the call path of the current thread.
CArrow linesConnect nodes to make up the entire call path for the thread(s).
DTooltip on Node HeaderShows the ID and user-defined name of each thread whose call path shares this node.
EMethod ContextRepresents one or more stack frames in the same method.


Sample code to use debugging

The debugging example below is used for five odd numbers to be sorted. This is the easiest way to figured out how the threads work together with the simple data.

  • How to start debugging

The following sequence may guides you start to debug on the visual Studio.

  1. put breakpoints where you want to take a look by hitting the key F9 in the line or left-click at the front of a line
  2. Run the program in Debug mode by hitting the green button (or key F5)
  3. Go to the menu Debug -> Windows to open the windows you need
  4. Choose the windows that you need (e.g. Memory, Threads, Parallel Stacks, Local or Auto and so on.)
  5. Hit the function keys to run a program
    1. F10 to run codes line by line (Step Over)
    2. F11 to go into a subroutine (Step Into)
    3. Shit +F11 to get out of a subroutine (Step Out)
    4. F9 to put/remove breakpoints in a line
    1. Data flow of parallel_qsort
 
alt dataflow
Explanation will be here soon.
    1. Parallel Stacks
 
alt qsort_set1
 
alt qsort_set2
Recursive calling parallel_qsort of spawning parallel_qsort in the first parallel_qsort function which main thread has responsible for The moment right after a spawning thread works in second parallel_qsort calling which Main Thread had finished
 
alt qsort_set3_done
 
alt qsort_set4_1
The moment that Main Thread is working for getting out of the previous spawning thread calling to parallel_qsort and 3d and 4th element values in the data array are exchanging in memory. For two level parallel_qsort function calling and two level spawning call to parallel_qsort, two Threads are working for this; Worker3 and Worker2

  • Debugging Tips
  1. Hit F9 at the front of a line to put the breakpoints
  2. Run the program in Debug mode first and then open the windows you need.
  3. Open the windows like Memory, Threads, Parallel Stacks, and Local or Auto.
  4. Hit F10 or F11 to run codes line by line
  5. F9 to put or remove breakpoints


Links about Intel® Parallel Studio XE 2017

  1. link1 Intel® Parallel Studio XE 2017
  2. link2 Intel® Parallel Studio XE 2017
  3. link Intel® Parallel Studio XE Release Notes