| 1 |
#include "callback.h" |
| 2 |
#include <omp.h> |
| 3 |
|
| 4 |
int main() |
| 5 |
{ |
| 6 |
unsigned int i; |
| 7 |
|
| 8 |
#pragma omp parallel for num_threads(1) schedule(SCHEDULE) |
| 9 |
for (i = 0; i < 1; i++) { |
| 10 |
} |
| 11 |
|
| 12 |
// Check if libomp supports the callbacks for this test. |
| 13 |
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_parallel_begin' |
| 14 |
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_parallel_end' |
| 15 |
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_implicit_task' |
| 16 |
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_work' |
| 17 |
|
| 18 |
|
| 19 |
// CHECK: 0: NULL_POINTER=[[NULL:.*$]] |
| 20 |
// CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], parent_task_frame.exit=[[NULL]], parent_task_frame.reenter={{0x[0-f]+}}, parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=1, codeptr_ra=0x{{[0-f]+}}, invoker={{[0-9]+}} |
| 21 |
|
| 22 |
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID:[0-9]+]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]] |
| 23 |
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_loop_begin: parallel_id=[[PARALLEL_ID]], parent_task_id=[[IMPLICIT_TASK_ID]], codeptr_ra=0x{{[0-f]+}} |
| 24 |
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_loop_end: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] |
| 25 |
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end: parallel_id={{[PARALLEL_ID,0]}}, task_id=[[IMPLICIT_TASK_ID]] |
| 26 |
|
| 27 |
return 0; |
| 28 |
} |