Oracle® Solaris Studio 12.4: dbx コマンドによるデバッグ

印刷ビューの終了

更新: 2015 年 1 月
 
 

領域およびスレッド情報の出力

現在の並列領域または指定された並列領域の説明を出力するには、omp_pr コマンドを使用します。これには、親領域、並列領域 ID、チームのサイズ (スレッドの数)、およびプログラムの場所 (プログラムカウンタアドレス) が含まれます。例:

(dbx) omp_pr
parallel region 127283434369843201
    team size = 4
    source location = test.c:103
    parent = 127283430568755201

また、現在の並列領域または指定された並列領域からそのルートまでのパスに沿ったすべての並列領域の説明を出力することもできます。例:

(dbx) omp_pr -ancestors
parallel region 127283434369843201
    team size = 4
    source location = test.c:103
    parent = 127283430568755201

    parallel region 127283430568755201
        team size = 4
        source location = test.c:95
        parent = <no parent>

また、並列領域ツリー全体も出力できます。例:

(dbx) omp_pr -tree
parallel region 127283430568755201
    team size = 4
    source location = test.c:95
    parent = <no parent>

    parallel region 127283434369843201
        team size = 4
        source location = test.c:103
        parent = 127283430568755201

詳細については、omp_pr コマンドを参照してください。

現在のタスク領域または指定されたタスク領域の説明を出力するには、omp_tr コマンドを使用します。これには、タスク領域 ID、状態 (spawnedexecutingwaiting)、実行中のスレッド、プログラムの場所 (プログラムカウンタアドレス)、未完了の子、および親が含まれます。例:

(dbx) omp_tr
task region 65540
    type = implicit
    state = executing
    executing thread = t@4
    source location == test.c:46
    unfinished children = 0
    parent = <no parent>

また、現在のタスク領域または指定されたタスク領域からそのルートまでのパスに沿ったすべてのタスク領域の説明を出力することもできます。

(dbx) omp_tr -ancestors
task region 196611
    type = implicit
    state = executing
    executing thread = t@3
    source location - test.c:103
    unfinished children = 0
    parent = 131075

    task region 131075
        type = implicit
        state = executing
        executing thread = t@3
        unfinished children = 0
        parent = <no parent>

また、タスク領域ツリー全体も出力できます。例:

(dbx) omp_tr -tree
task region 10
    type = implicit
    state = executing
    executing thread = t@10
    source location = test.c:103
    unfinished children = 0
    parent = <no parent>
task region 7
    type = implicit
    state = executing
    executing thread = t@7
    source location = test.c:103
    unfinished children = 0
    parent = <no parent>
task region 6
    type implicit
    state = executing
    executing thread = t@6
    source location = test.c:103
    unfinished children = 0
    parent = <o parent>
task region 196609
    type = implicit
    state = executing
    executing thread = t@1
    source location = test.c:95
    unfinished children = 0
    parent = <no parent>

    task region 262145
        type = implicit
        state = executing
        executing thread = t@1
        source location = test.c:103
        unfinished children - 0
        parent = 196609
 

詳細については、omp_tr コマンドを参照してください。

現在のループの説明を出力するには、omp_loop コマンドを使用します。これには、スケジューリング型 (静的、動的、ガイド付き、自動、または実行時)、順序付きかどうか、範囲、ステップ数または刻み幅、および繰り返し回数が含まれます。例:

(dbx) omp_loop
    ordered loop: no
    lower bound: 0
    upper bound: 3
    step: 1
    chunk: 1
    schedule type: static
    source location: test.c:49

詳細については、omp_loop コマンドを参照してください。

現在のチームまたは指定された並列領域のチーム上のすべてのスレッドを出力するには、omp_team コマンドを使用します。例:

(dbx) omp_team
team members:
    0: t@1 state = in implicit barrier, task region = 262145
    1: t@6 state = in implicit barrier, task region = 6
    2: t@7 state = working, task region = 7
    3: t@10 state = in implicit barrier, task region = 10

詳細については、omp_team コマンドを参照してください。

OpenMP コードをデバッグしている場合、thread –info は、現在のスレッドまたは指定されたスレッドに関する通常の情報に加えて、OpenMP スレッド ID、並列領域 ID、タスク領域 ID、および OpenMP スレッドの状態を出力します。詳細については、thread コマンドを参照してください。