Identifies, using the width argument, any additional processes or threads to stop when stopping the thread that arrives at a barrier point.
The argument width may have one of the following three values:
After all processes or threads reach the barrier, releases all processes and threads held at the barrier. (Released means that these threads and processes can run.) Setting this option stops additional threads contained in the same
group or
process.
Use the width argument indicates other stopped processes or threads. You can enter one of the following three values:
Stops the satisfaction set. For process barriers, process and
none have the same effect. This is the default if the
BARRIER_STOP_WHEN_DONE variable is
none.
The dbarrier command sets a process or thread barrier breakpoint that triggers when execution arrives at a location. This command returns the ID of the newly created breakpoint.
The dbarrier command is most often used to synchronize a set of threads. The P/T set defines which threads the barrier affects. When a thread reaches a barrier, it stops, just as it does for a breakpoint. The difference is that TotalView prevents—that is, holds—each thread that reaches the barrier from responding to resume commands (for example,
dstep,
dnext, and
dgo) until
all threads in the affected set arrive at the barrier. When all threads reach the barrier, TotalView considers the barrier to be
satisfied and releases these threads. Note that they are just
released, not continued. That is, TotalView leaves them stopped at the barrier. If you continue the process, those threads stopped at the barrier also run along with any other threads that were not participating with the barrier. After the threads are released, they can respond to resume commands.
The -stop_when_hit option specifies if other threads should stop when a thread arrives at a barrier.
The -stop_when_done option controls the set of additional threads that are stopped when the barrier is finally satisfied. That is, you can also stop an additional collection of threads after the last expected thread arrives, and all the threads held at the barrier are released. Normally, you want to stop the threads contained in the control group.
If you omit a stop option, TotalView sets the default behavior by using the
BARRIER_STOP_ALL and
BARRIER_STOP_WHEN_DONE variables.
Use the none argument for these options to not stop additional threads.
Holds each thread in processes 1, 2, and 3 as it arrives at the first executable line in procedure my_proc. After all threads arrive, the barrier is satisfied and TotalView releases all processes.