brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · b69ff5f Raw
58 lines · c
1// clang-format off2// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s3// REQUIRES: ompt4// UNSUPPORTED: gnu, intel-16.05// clang-format on6 7#include "callback.h"8#include <omp.h>9 10int main() {11  unsigned int i, x;12 13#pragma omp parallel num_threads(2)14  {15#pragma omp barrier16 17#pragma omp master18#pragma omp taskloop grainsize(4)19    for (i = 0; i < 16; i++) {20      // Make every iteration takes at least 1ms21      delay(1000);22    }23  }24  // clang-format off25  // CHECK: 0: NULL_POINTER=[[NULL:.*$]]26 27  // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin:28  // CHECK-SAME: parent_task_id={{[0-f]+}}29  // CHECK-SAME: parallel_id=[[PARALLEL_ID:[0-f]+]]30  // CHECK-SAME: requested_team_size=231  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin:32  // CHECK-SAME: parallel_id=[[PARALLEL_ID]]33  // CHECK-SAME: task_id=[[IMPLICIT_TASK_ID1:[0-9]+]]34  // CHECK-SAME: team_size=2, thread_num=035 36  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_taskloop_begin:37  // CHECK-SAME: parallel_id=[[PARALLEL_ID]]38  // CHECK-SAME: task_id=[[IMPLICIT_TASK_ID1]]39  // CHECK-SAME: codeptr_ra=[[RETURN_ADDRESS:(0x)?[0-f]+]], count=1640 41  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create:42  // CHECK-SAME: new_task_id=[[TASK_ID0:[0-9]+]]43  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create:44  // CHECK-SAME: new_task_id=[[TASK_ID1:[0-9]+]]45  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create:46  // CHECK-SAME: new_task_id=[[TASK_ID2:[0-9]+]]47  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create:48  // CHECK-SAME: new_task_id=[[TASK_ID3:[0-9]+]]49 50  // CHECK-DAG: {{.*}}: ompt_event_taskloop_chunk_begin:{{.*}}task_id=[[TASK_ID0]]{{.*}}chunk_iterations=451  // CHECK-DAG: {{.*}}: ompt_event_taskloop_chunk_begin:{{.*}}task_id=[[TASK_ID1]]{{.*}}chunk_iterations=452  // CHECK-DAG: {{.*}}: ompt_event_taskloop_chunk_begin:{{.*}}task_id=[[TASK_ID2]]{{.*}}chunk_iterations=453  // CHECK-DAG: {{.*}}: ompt_event_taskloop_chunk_begin:{{.*}}task_id=[[TASK_ID3]]{{.*}}chunk_iterations=454  // clang-format on55 56  return 0;57}58