diff options
author | Tom Stellard <tstellar@redhat.com> | 2019-07-19 14:14:12 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2019-07-19 14:14:12 +0000 |
commit | c9e7fc8c97382d61565f7ed180e4ea1cc8895b95 (patch) | |
tree | 49e96067e292b878b898418e8e34d39b292ecc9d /final/runtime/test/ompt/synchronization/taskwait.c | |
parent | fbb805289dbc14ab68a145e44cc092a118dc6c3f (diff) |
Creating release candidate final from release_801 branchsvn-tags/RELEASE_801
git-svn-id: https://llvm.org/svn/llvm-project/openmp/tags/RELEASE_801@366581 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 | 37 |
1 files changed, 37 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..cb30f3b --- /dev/null +++ b/final/runtime/test/ompt/synchronization/taskwait.c @@ -0,0 +1,37 @@ +// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s +// REQUIRES: ompt +// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 +// XFAIL: powerpc64le, ppc64le +#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; +} |