diff options
author | Hans Wennborg <hans@hanshq.net> | 2019-09-19 13:10:55 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2019-09-19 13:10:55 +0000 |
commit | eb3f3d3dba53c4a84a47ad34e7c80dd03fb166b1 (patch) | |
tree | f9967a40084999103f3aec7ea6fd7b3ae67bfa3e /final/runtime/test/ompt/synchronization/taskwait.c | |
parent | 45d991f974a1776dca2641bce0f1756182ce6b4d (diff) |
Creating release candidate final from release_900 branchsvn-tags/RELEASE_900
git-svn-id: https://llvm.org/svn/llvm-project/openmp/tags/RELEASE_900@372316 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'final/runtime/test/ompt/synchronization/taskwait.c')
-rw-r--r-- | final/runtime/test/ompt/synchronization/taskwait.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/final/runtime/test/ompt/synchronization/taskwait.c b/final/runtime/test/ompt/synchronization/taskwait.c new file mode 100644 index 0000000..c431024 --- /dev/null +++ b/final/runtime/test/ompt/synchronization/taskwait.c @@ -0,0 +1,36 @@ +// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s +// REQUIRES: ompt +// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 +#include "callback.h" +#include <omp.h> + +int main() +{ + int x = 0; + #pragma omp parallel num_threads(2) + { + #pragma omp master + { + #pragma omp task + { + x++; + } + #pragma omp taskwait + print_current_address(1); + } + } + + // Check if libomp supports the callbacks for this test. + // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_sync_region' + // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_sync_region_wait' + + // CHECK: 0: NULL_POINTER=[[NULL:.*$]] + + // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_taskwait_begin: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]] + // CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_taskwait_begin: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra=[[RETURN_ADDRESS]] + // CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_taskwait_end: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra=[[RETURN_ADDRESS]] + // CHECK-NEXT: {{^}}[[MASTER_ID]]: ompt_event_taskwait_end: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra=[[RETURN_ADDRESS]] + // CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]] + + return 0; +} |