brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 38d4ef1 Raw
35 lines · c
1// clang-format off2// RUN: %libomp-compile-and-run | FileCheck %s3// REQUIRES: ompt4// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-75// clang-format on6#include "callback.h"7#include <omp.h>8 9int main() {10#pragma omp ordered11  {12    print_current_address(1);13    print_ids(0);14  }15  print_current_address(2);16 17  // clang-format off18  // Check if libomp supports the callbacks for this test.19  // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_mutex_acquire'20  // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_mutex_acquired'21  // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_mutex_released'22  // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_nest_lock'23 24  // CHECK: 0: NULL_POINTER=[[NULL:.*$]]25 26  // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_wait_ordered: wait_id=[[WAIT_ID:[0-9]+]], hint={{[0-9]+}}, impl={{[0-9]+}}, codeptr_ra=[[RETURN_ADDRESS:(0x)?[0-f]+]]27  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_acquired_ordered: wait_id=[[WAIT_ID]], codeptr_ra=[[RETURN_ADDRESS]]28  // CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]]29  // CHECK: {{^}}[[MASTER_ID]]: ompt_event_release_ordered: wait_id=[[WAIT_ID]], codeptr_ra=[[RETURN_ADDRESS:(0x)?[0-f]+]]30  // CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]]31  // clang-format on32 33  return 0;34}35