1 // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
3 // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
13 #pragma omp parallel num_threads(2)
19 print_current_address(1);
26 print_current_address(2);
31 // Check if libomp supports the callbacks for this test.
32 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_task_create'
33 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_task_schedule'
34 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_cancel'
35 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_thread_begin'
38 // CHECK: {{^}}0: NULL_POINTER=[[NULL:.*$]]
40 // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_taskgroup_begin: parallel_id=[[PARALLEL_ID:[0-9]+]], task_id=[[TASK_ID:[0-9]+]], codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]
41 // CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]]
42 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_taskgroup_begin: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]], codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]
43 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_taskgroup_end: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]], codeptr_ra=[[RETURN_ADDRESS]]
44 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_taskgroup_end: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]], codeptr_ra=[[RETURN_ADDRESS]]
45 // CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]]