aboutsummaryrefslogtreecommitdiff
path: root/final/runtime/test/ompt/misc/threads.c
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2019-07-19 14:14:12 +0000
committerTom Stellard <tstellar@redhat.com>2019-07-19 14:14:12 +0000
commitc9e7fc8c97382d61565f7ed180e4ea1cc8895b95 (patch)
tree49e96067e292b878b898418e8e34d39b292ecc9d /final/runtime/test/ompt/misc/threads.c
parentfbb805289dbc14ab68a145e44cc092a118dc6c3f (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/misc/threads.c')
-rw-r--r--final/runtime/test/ompt/misc/threads.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/final/runtime/test/ompt/misc/threads.c b/final/runtime/test/ompt/misc/threads.c
new file mode 100644
index 0000000..4a0fc6f
--- /dev/null
+++ b/final/runtime/test/ompt/misc/threads.c
@@ -0,0 +1,34 @@
+// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
+// REQUIRES: ompt
+#include "callback.h"
+#include <omp.h>
+
+int main() {
+ int x = 0;
+#pragma omp parallel num_threads(4)
+ {
+#pragma omp atomic
+ x++;
+ }
+
+ // CHECK: 0: NULL_POINTER=[[NULL:.*$]]
+
+ // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_thread_begin:
+ // CHECK-SAME: thread_type=ompt_thread_initial=1, thread_id=[[MASTER_ID]]
+ // CHECK: {{^}}[[MASTER_ID]]: ompt_event_thread_end:
+ // CHECK-SAME: thread_id=[[MASTER_ID]]
+ // CHECK: {{^}}[[WORKER_ID1:[0-9]+]]: ompt_event_thread_begin:
+ // CHECK-SAME: thread_type=ompt_thread_worker=2, thread_id=[[WORKER_ID1]]
+ // CHECK: {{^}}[[WORKER_ID1]]: ompt_event_thread_end:
+ // CHECK-SAME: thread_id=[[WORKER_ID1]]
+ // CHECK: {{^}}[[WORKER_ID2:[0-9]+]]: ompt_event_thread_begin:
+ // CHECK-SAME: thread_type=ompt_thread_worker=2, thread_id=[[WORKER_ID2]]
+ // CHECK: {{^}}[[WORKER_ID2]]: ompt_event_thread_end:
+ // CHECK-SAME: thread_id=[[WORKER_ID2]]
+ // CHECK: {{^}}[[WORKER_ID3:[0-9]+]]: ompt_event_thread_begin:
+ // CHECK-SAME: thread_type=ompt_thread_worker=2, thread_id=[[WORKER_ID3]]
+ // CHECK: {{^}}[[WORKER_ID3]]: ompt_event_thread_end:
+ // CHECK-SAME: thread_id=[[WORKER_ID3]]
+
+ return 0;
+}