Community
cancel
Showing results for 
Search instead for 
Did you mean: 
mattsdad
Beginner
67 Views

debugger + threads = aaaargggh

When I am using OpenMP threaded code compiled in Visual Studio using Intel Fortran. When I get to the OpenMP thread, the debugger goes crazy. It appears to be jumping between the different threads each time I do a "Step Into" or a "Next".

Is there a way to control the individual threads separately in the debugger (without rewriting the code to do a select statement on the thread id)?

0 Kudos
2 Replies
jimdempseyatthecove
Black Belt
67 Views

When you reach the breakpoint in the subroutine click on Debug | Windows | Threads

The thread causing the break will be indicated with a =>

You can right click on each of the other thread(s) and choose Freeze (or if you have many threads click on select all, then freeze, then click on the active thread and unfreeze).

Set break point at end of parallel region or end of subroutine and remember to unfreeze the other threads.

Jim Dempsey

mattsdad
Beginner
67 Views

Thanks, that is exactly what I was looking for.
Reply