Changes

Jump to: navigation, search

OpenMP Debugging in Visual Studio / Team Debug

195 bytes added, 16:16, 10 December 2017
m
Walkthrough
= Walkthrough =
test environment: "visual studio 2015" with "Intel Parallel Studio XE 2016"with C++
==Case A - Using the Thread window==
To use OpenMP in visual studio, it is essential to turn on the OpenMP option. Debug> projectName option>C/C++>language>OpenMP support:YES
[[File:setting.png|600px|center|setting]]
If the option was off, the result goes this. OpenMP doesn't work.
[[File:noopenResult.png|400px|center|noopenResult]]
'''serial region'''
On the Threads window, you can see "main thread" line and some worker threads. The yellow arrow points only main thread. and go the next region. Apparently, ntdll.. threads are not used.
[[File:serial.png|1000px|center|serial]]
You can see "Stack Frame" name on the top screen is changed to main\omp\1
On the Threads window, you can see "main thread" and other new three thread which same as default usable thread number 4(it is printed at the serial region as "omp_get_max_threads()"). after hit hitting 4 times(you can see the count on the breakpoint Window), the step goes to the next region.
[[File:open.png|1000px|center|open]]
You can see "Stack Frame" name on the top screen is changed to main\omp\2
On the Threads window, you can see "main thread" and other new seven thread which same as the thread number decided inside of the code. after hit hitting 8 times, the debugging is terminated.
[[File:open+.png|1000px|center|open+]]
190
edits

Navigation menu