idb info barrier (gdb mode only)

Shows information for existing barriers in an OpenMP* application.

Syntax

idb info barrier [ barrier_id, ... ]

Parameters

barrier_id

A barrier ID.

Description

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:

If you do not specify barrier_id, this command shows all existing barriers in the OpenMP application.

Note iconNote

This command is fully supported for OpenMP versions 3.0 and higher. For older versions, this command has restricted functionality.

Example

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

See Also


Submit feedback on this help topic

Copyright © 2001-2011, Intel Corporation. All rights reserved.