Shows information for existing barriers in an OpenMP* application.
idb info barrier [ barrier_id, ... ]
barrier_id |
A barrier ID. |
An OpenMP* barrier defines a point in an application that every thread of a particular set has to reach before thread execution continues.
This command displays the following information for any existing barriers, which you specify with barrier_id, in an OpenMP application:
state
the threads that reached the barrier
the barrier's location
a list of tasks the barrier is waiting for
the source code that created the current barrier
If you do not specify barrier_id, this command shows all existing barriers in the OpenMP application.
This command is fully supported for OpenMP versions 3.0 and higher. For older versions, this command has restricted functionality.
Consider lines 26-34 of code in c_explicit_barriers.c:
26 while ( num != go ) { 27 sleep( sleep_time ); 28 }; // while 29 sleep( sleep_time ); 30 31 bp(); // No barriers for the first hit, one thread reach the barrier second hit, etc. 32 ++ go; // Let the next thread go. 33 34 #pragma omp barrier
The following example demonstrates the output that idb info barrier displays. In this example, a breakpoint is already set at line 31.
(idb) c Continuing. Breakpoint 1, test (num_threads=-1225743048) at c_explicit_barriers.c:31 31 bp(); (idb) idb info barrier 80100003 workshare barrier for team 8, waiting threads Created at: "c_explicit_barriers.c":test:34:34 3 threads have reached: 1 3 4 Awaiting tasks: unknown
Copyright © 1996-2010, Intel Corporation. All rights reserved.