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)?
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.