brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 179e65d Raw
57 lines · c
1// clang-format off2// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s3// REQUIRES: ompt4 5/// GCC lowering of distribute results in calls to 6/// omp_get_num_teams/omp_get_team_num rather than region calls7// UNSUPPORTED: gcc8// clang-format on9#include "callback.h"10 11#define WORK_SIZE 6412 13int main() {14  int i;15#pragma omp teams num_teams(4) thread_limit(1)16#pragma omp distribute dist_schedule(static, WORK_SIZE / 4)17  for (i = 0; i < WORK_SIZE; i++) {18  }19 20  return 0;21}22 23// clang-format off24// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_work'25// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_dispatch'26 27// CHECK: 0: NULL_POINTER=[[NULL:.*$]]28 29// CHECK: {{^}}[[THREAD_ID0:[0-9]+]]: ompt_event_distribute_begin:30// CHECK-SAME: parallel_id=[[PARALLEL_ID0:[0-9]+]]31// CHECK-SAME: task_id=[[TASK_ID0:[0-9]+]]32// CHECK: {{^}}[[THREAD_ID0]]: ompt_event_distribute_chunk_begin:33// CHECK-SAME: parallel_id=[[PARALLEL_ID0]], task_id=[[TASK_ID0]]34// CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=1635 36// CHECK: {{^}}[[THREAD_ID1:[0-9]+]]: ompt_event_distribute_begin:37// CHECK-SAME: parallel_id=[[PARALLEL_ID1:[0-9]+]]38// CHECK-SAME: task_id=[[TASK_ID1:[0-9]+]]39// CHECK: {{^}}[[THREAD_ID1]]: ompt_event_distribute_chunk_begin:40// CHECK-SAME: parallel_id=[[PARALLEL_ID1]], task_id=[[TASK_ID1]]41// CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=1642 43// CHECK: {{^}}[[THREAD_ID2:[0-9]+]]: ompt_event_distribute_begin:44// CHECK-SAME: parallel_id=[[PARALLEL_ID2:[0-9]+]]45// CHECK-SAME: task_id=[[TASK_ID2:[0-9]+]]46// CHECK: {{^}}[[THREAD_ID2]]: ompt_event_distribute_chunk_begin:47// CHECK-SAME: parallel_id=[[PARALLEL_ID2]], task_id=[[TASK_ID2]]48// CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=1649 50// CHECK: {{^}}[[THREAD_ID3:[0-9]+]]: ompt_event_distribute_begin:51// CHECK-SAME: parallel_id=[[PARALLEL_ID3:[0-9]+]]52// CHECK-SAME: task_id=[[TASK_ID3:[0-9]+]]53// CHECK: {{^}}[[THREAD_ID3]]: ompt_event_distribute_chunk_begin:54// CHECK-SAME: parallel_id=[[PARALLEL_ID3]], task_id=[[TASK_ID3]]55// CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=1656// clang-format on57