Sun Studio 12 Update 1: Debugging a Program With dbx

Using the dump Command on OpenMP Code

When execution is stopped in a parallel region, a dump command may print more than one copy of private variables. In the following example, the dump command prints two copies of the variable i:


[t@1 l@1]: dump
i = 1
sum = 0.0
a = ARRAY
i = 1000001

Two copies of variable i are printed because the outlined routine is implemented as a nested function of the hosting routine, and private variables are implemented as local variables of the outlined routine. Since a dump command prints all the variables in scope, both the i in hosting routine and the i in the outlined routine are displayed.