Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

debugger + threads = aaaargggh

mattsdad
Beginner
385 Views

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
Honored Contributor III
385 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

0 Kudos
mattsdad
Beginner
385 Views
Thanks, that is exactly what I was looking for.
0 Kudos
Reply