reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
#include <omp.h>
#include "callback.h"

int main() {
  omp_set_nested(1);
#pragma omp parallel num_threads(2)
  {
#pragma omp barrier
#pragma omp parallel num_threads(2)
    { print_frame(0); }
  }

  // CHECK: 0: NULL_POINTER=[[NULL:.*$]]

  // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin:
  // CHECK-SAME: parallel_id=[[PARALLEL_ID:[0-9]+]]
  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin:
  // CHECK-SAME: parallel_id=[[PARALLEL_ID]]
  // CHECK-SAME: thread_num=[[OUTER_THREAD_NUM1:[0-9]+]]
  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin:
  // CHECK-SAME: parallel_id=[[INNER_PARALLEL_ID1:[0-9]+]]
  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin:
  // CHECK-SAME: parallel_id=[[INNER_PARALLEL_ID1]]
  // CHECK-SAME: thread_num=[[INNER_THREAD_NUM1:[0-9]+]]
  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end
  // CHECK-SAME: thread_num=[[INNER_THREAD_NUM1]]
  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_end:
  // CHECK-SAME: parallel_id=[[INNER_PARALLEL_ID1]]
  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end
  // CHECK-SAME: thread_num=[[OUTER_THREAD_NUM1]]
  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_end:
  // CHECK-SAME: parallel_id=[[PARALLEL_ID]]

  // CHECK: {{^}}[[WORKER_ID1:[0-9]+]]: ompt_event_implicit_task_begin:
  // CHECK-SAME: parallel_id=[[PARALLEL_ID]]
  // CHECK-SAME: thread_num=[[OUTER_THREAD_NUM2:[0-9]+]]
  // CHECK: {{^}}[[WORKER_ID1]]: ompt_event_parallel_begin:
  // CHECK-SAME: parallel_id=[[INNER_PARALLEL_ID2:[0-9]+]]
  // CHECK: {{^}}[[WORKER_ID1]]: ompt_event_implicit_task_begin:
  // CHECK-SAME: parallel_id=[[INNER_PARALLEL_ID2]]
  // CHECK-SAME: thread_num=[[INNER_THREAD_NUM2:[0-9]+]]
  // CHECK: {{^}}[[WORKER_ID1]]: ompt_event_implicit_task_end
  // CHECK-SAME: thread_num=[[INNER_THREAD_NUM2]]
  // CHECK: {{^}}[[WORKER_ID1]]: ompt_event_parallel_end:
  // CHECK-SAME: parallel_id=[[INNER_PARALLEL_ID2]]
  // CHECK: {{^}}[[WORKER_ID1]]: ompt_event_implicit_task_end
  // CHECK-SAME: thread_num=[[OUTER_THREAD_NUM2]]

  // CHECK: {{^}}[[WORKER_ID2:[0-9]+]]: ompt_event_implicit_task_begin:
  // CHECK-SAME: thread_num=[[INNER_THREAD_NUM3:[0-9]+]]
  // CHECK: {{^}}[[WORKER_ID2]]: ompt_event_implicit_task_end
  // CHECK-SAME: thread_num=[[INNER_THREAD_NUM3]]

  // CHECK: {{^}}[[WORKER_ID3:[0-9]+]]: ompt_event_implicit_task_begin:
  // CHECK-SAME: thread_num=[[INNER_THREAD_NUM4:[0-9]+]]
  // CHECK: {{^}}[[WORKER_ID3]]: ompt_event_implicit_task_end
  // CHECK-SAME: thread_num=[[INNER_THREAD_NUM4]]

  return 0;
}