[Openmp-commits] [openmp] r325922 - [OMPT] Fix parallel_data in implicit barrier-end
Jonas Hahnfeld via Openmp-commits
openmp-commits at lists.llvm.org
Fri Feb 23 08:46:25 PST 2018
Author: hahnfeld
Date: Fri Feb 23 08:46:25 2018
New Revision: 325922
URL: http://llvm.org/viewvc/llvm-project?rev=325922&view=rev
Log:
[OMPT] Fix parallel_data in implicit barrier-end
This is required to be NULL for implicit barriers at the end of a
parallel region. Noticed in review of D43191.
Differential Revision: https://reviews.llvm.org/D43308
Modified:
openmp/trunk/runtime/src/kmp_barrier.cpp
openmp/trunk/runtime/src/kmp_runtime.cpp
openmp/trunk/runtime/test/ompt/parallel/normal.c
openmp/trunk/runtime/test/ompt/tasks/serialized.c
Modified: openmp/trunk/runtime/src/kmp_barrier.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_barrier.cpp?rev=325922&r1=325921&r2=325922&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_barrier.cpp (original)
+++ openmp/trunk/runtime/src/kmp_barrier.cpp Fri Feb 23 08:46:25 2018
@@ -1883,34 +1883,31 @@ void __kmp_fork_barrier(int gtid, int ti
}
#if OMPT_SUPPORT
- if (ompt_enabled.enabled) {
- if (this_thr->th.ompt_thread_info.state ==
- omp_state_wait_barrier_implicit) {
- int ds_tid = this_thr->th.th_info.ds.ds_tid;
- ompt_data_t *tId = (team) ? OMPT_CUR_TASK_DATA(this_thr)
- : &(this_thr->th.ompt_thread_info.task_data);
- this_thr->th.ompt_thread_info.state = omp_state_overhead;
+ if (ompt_enabled.enabled &&
+ this_thr->th.ompt_thread_info.state == omp_state_wait_barrier_implicit) {
+ int ds_tid = this_thr->th.th_info.ds.ds_tid;
+ ompt_data_t *task_data = (team)
+ ? OMPT_CUR_TASK_DATA(this_thr)
+ : &(this_thr->th.ompt_thread_info.task_data);
+ this_thr->th.ompt_thread_info.state = omp_state_overhead;
#if OMPT_OPTIONAL
- void *codeptr = NULL;
- if (KMP_MASTER_TID(ds_tid) &&
- (ompt_callbacks.ompt_callback(ompt_callback_sync_region_wait) ||
- ompt_callbacks.ompt_callback(ompt_callback_sync_region)))
- codeptr = team->t.ompt_team_info.master_return_address;
- if (ompt_enabled.ompt_callback_sync_region_wait) {
- ompt_callbacks.ompt_callback(ompt_callback_sync_region_wait)(
- ompt_sync_region_barrier, ompt_scope_end, NULL, tId, codeptr);
- }
- if (ompt_enabled.ompt_callback_sync_region) {
- ompt_callbacks.ompt_callback(ompt_callback_sync_region)(
- ompt_sync_region_barrier, ompt_scope_end, NULL, tId, codeptr);
- }
+ void *codeptr = NULL;
+ if (KMP_MASTER_TID(ds_tid) &&
+ (ompt_callbacks.ompt_callback(ompt_callback_sync_region_wait) ||
+ ompt_callbacks.ompt_callback(ompt_callback_sync_region)))
+ codeptr = team->t.ompt_team_info.master_return_address;
+ if (ompt_enabled.ompt_callback_sync_region_wait) {
+ ompt_callbacks.ompt_callback(ompt_callback_sync_region_wait)(
+ ompt_sync_region_barrier, ompt_scope_end, NULL, task_data, codeptr);
+ }
+ if (ompt_enabled.ompt_callback_sync_region) {
+ ompt_callbacks.ompt_callback(ompt_callback_sync_region)(
+ ompt_sync_region_barrier, ompt_scope_end, NULL, task_data, codeptr);
+ }
#endif
- if (!KMP_MASTER_TID(ds_tid) && ompt_enabled.ompt_callback_implicit_task) {
- ompt_callbacks.ompt_callback(ompt_callback_implicit_task)(
- ompt_scope_end, NULL, tId, 0, ds_tid);
- }
- // return to idle state
- this_thr->th.ompt_thread_info.state = omp_state_overhead;
+ if (!KMP_MASTER_TID(ds_tid) && ompt_enabled.ompt_callback_implicit_task) {
+ ompt_callbacks.ompt_callback(ompt_callback_implicit_task)(
+ ompt_scope_end, NULL, task_data, 0, ds_tid);
}
}
#endif
Modified: openmp/trunk/runtime/src/kmp_runtime.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.cpp?rev=325922&r1=325921&r2=325922&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.cpp (original)
+++ openmp/trunk/runtime/src/kmp_runtime.cpp Fri Feb 23 08:46:25 2018
@@ -7164,10 +7164,10 @@ void __kmp_internal_join(ident_t *id, in
__kmp_join_barrier(gtid); /* wait for everyone */
#if OMPT_SUPPORT
- int ds_tid = this_thr->th.th_info.ds.ds_tid;
- if (this_thr->th.ompt_thread_info.state == omp_state_wait_barrier_implicit) {
- ompt_data_t *tId = OMPT_CUR_TASK_DATA(this_thr);
- ompt_data_t *pId = OMPT_CUR_TEAM_DATA(this_thr);
+ if (ompt_enabled.enabled &&
+ this_thr->th.ompt_thread_info.state == omp_state_wait_barrier_implicit) {
+ int ds_tid = this_thr->th.th_info.ds.ds_tid;
+ ompt_data_t *task_data = OMPT_CUR_TASK_DATA(this_thr);
this_thr->th.ompt_thread_info.state = omp_state_overhead;
#if OMPT_OPTIONAL
void *codeptr = NULL;
@@ -7178,19 +7178,17 @@ void __kmp_internal_join(ident_t *id, in
if (ompt_enabled.ompt_callback_sync_region_wait) {
ompt_callbacks.ompt_callback(ompt_callback_sync_region_wait)(
- ompt_sync_region_barrier, ompt_scope_end, pId, tId, codeptr);
+ ompt_sync_region_barrier, ompt_scope_end, NULL, task_data, codeptr);
}
if (ompt_enabled.ompt_callback_sync_region) {
ompt_callbacks.ompt_callback(ompt_callback_sync_region)(
- ompt_sync_region_barrier, ompt_scope_end, pId, tId, codeptr);
+ ompt_sync_region_barrier, ompt_scope_end, NULL, task_data, codeptr);
}
#endif
if (!KMP_MASTER_TID(ds_tid) && ompt_enabled.ompt_callback_implicit_task) {
ompt_callbacks.ompt_callback(ompt_callback_implicit_task)(
- ompt_scope_end, NULL, tId, 0, ds_tid);
+ ompt_scope_end, NULL, task_data, 0, ds_tid);
}
- // return to idle state
- this_thr->th.ompt_thread_info.state = omp_state_overhead;
}
#endif
Modified: openmp/trunk/runtime/test/ompt/parallel/normal.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/parallel/normal.c?rev=325922&r1=325921&r2=325922&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/parallel/normal.c (original)
+++ openmp/trunk/runtime/test/ompt/parallel/normal.c Fri Feb 23 08:46:25 2018
@@ -1,11 +1,11 @@
// RUN: %libomp-compile-and-run | FileCheck %s
-// RUN: %libomp-compile-and-run | %sort-threads | FileCheck --check-prefix=THREADS %s
+// RUN: %libomp-compile-and-run | %sort-threads \
+// RUN: | FileCheck --check-prefix=THREADS %s
// REQUIRES: ompt
#include "callback.h"
-int main()
-{
- #pragma omp parallel num_threads(4)
+int main() {
+#pragma omp parallel num_threads(4)
{
print_ids(0);
print_ids(1);
@@ -13,78 +13,120 @@ int main()
print_fuzzy_address(1);
// Check if libomp supports the callbacks for this test.
- // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_thread_begin'
- // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_thread_end'
- // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_parallel_begin'
- // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_parallel_end'
- // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_implicit_task'
-
+ // CHECK-NOT: {{^}}0: Could not register callback
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
-
+
// make sure initial data pointers are null
// CHECK-NOT: 0: parallel_data initially not null
// CHECK-NOT: 0: task_data initially not null
// CHECK-NOT: 0: thread_data initially not null
- // 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=4, codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}}, invoker=[[PARALLEL_INVOKER:[0-9]+]]
+ // Only check callback names, arguments are verified in THREADS below.
+ // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin
- // CHECK-DAG: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
- // CHECK-DAG: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]]
+ // CHECK-DAG: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin
+ // CHECK-DAG: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end
- // Note that we cannot ensure that the worker threads have already called barrier_end and implicit_task_end before parallel_end!
+ // Note that we cannot ensure that the worker threads have already called
+ // barrier_end and implicit_task_end before parallel_end!
- // CHECK-DAG: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
- // CHECK-DAG: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // CHECK-DAG: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_implicit_task_begin
+ // CHECK-DAG: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin
- // CHECK-DAG: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
- // CHECK-DAG: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // CHECK-DAG: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_implicit_task_begin
+ // CHECK-DAG: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin
- // CHECK-DAG: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
- // CHECK-DAG: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
-
- // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_end: parallel_id=[[PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], invoker=[[PARALLEL_INVOKER]], codeptr_ra=[[RETURN_ADDRESS]]{{[0-f][0-f]}}
- // CHECK: {{^}}[[MASTER_ID]]: fuzzy_address={{.*}}[[RETURN_ADDRESS]]
+ // CHECK-DAG: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_implicit_task_begin
+ // CHECK-DAG: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin
+ // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_end
// THREADS: 0: NULL_POINTER=[[NULL:.*$]]
- // THREADS: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_thread_begin: thread_type=ompt_thread_initial=1, thread_id=[[MASTER_ID]]
- // THREADS: {{^}}[[MASTER_ID]]: 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=4, codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}}, invoker={{.*}}
-
- // THREADS: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
- // THREADS: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
- // THREADS: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], task_id=[[PARENT_TASK_ID]]
- // THREADS-NOT: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end
- // THREADS: {{^}}[[MASTER_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], codeptr_ra=[[RETURN_ADDRESS]]{{[0-f][0-f]}}
- // THREADS: {{^}}[[MASTER_ID]]: ompt_event_barrier_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]], codeptr_ra=[[RETURN_ADDRESS]]{{[0-f][0-f]}}
- // THREADS: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]]
-
- // THREADS: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_thread_begin: thread_type=ompt_thread_worker=2, thread_id=[[THREAD_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
- // THREADS: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]]
- // THREADS-NOT: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_end
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]]
-
- // THREADS: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_thread_begin: thread_type=ompt_thread_worker=2, thread_id=[[THREAD_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
- // THREADS: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]]
- // THREADS-NOT: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_end
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]]
-
- // THREADS: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_thread_begin: thread_type=ompt_thread_worker=2, thread_id=[[THREAD_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
- // THREADS: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]]
- // THREADS-NOT: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_end
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]]
- // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_thread_begin
+ // THREADS-SAME: thread_type=ompt_thread_initial=1, thread_id=[[MASTER_ID]]
+ // THREADS: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin
+ // THREADS-SAME: parent_task_id=[[PARENT_TASK_ID:[0-9]+]]
+ // THREADS-SAME: parent_task_frame.exit=[[NULL]]
+ // THREADS-SAME: parent_task_frame.reenter={{0x[0-f]+}}
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=4
+ // THREADS-SAME: codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}}
+
+ // THREADS: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]]
+ // THREADS-SAME: task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
+ // THREADS: {{^}}[[MASTER_ID]]: task level 0
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[MASTER_ID]]: task level 1
+ // THREADS-SAME: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]]
+ // THREADS-SAME: task_id=[[PARENT_TASK_ID]]
+ // THREADS-NOT: ompt_event_implicit_task_end
+ // THREADS: {{^}}[[MASTER_ID]]: ompt_event_barrier_begin
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS-SAME: codeptr_ra=[[RETURN_ADDRESS]]{{[0-f][0-f]}}
+ // THREADS: {{^}}[[MASTER_ID]]: ompt_event_barrier_end
+ // parallel_id is 0 because the region ended in the barrier!
+ // THREADS-SAME: parallel_id=0, task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS-SAME: codeptr_ra=[[RETURN_ADDRESS]]{{[0-f][0-f]}}
+ // THREADS: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end
+ // THREADS-SAME: parallel_id=0, task_id=[[IMPLICIT_TASK_ID]]
+
+ // THREADS: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_thread_begin
+ // THREADS-SAME: thread_type=ompt_thread_worker=2, thread_id=[[THREAD_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_begin
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]]
+ // THREADS-SAME: task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
+ // THREADS: {{^}}[[THREAD_ID]]: task level 0
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: task level 1
+ // THREADS-SAME: parallel_id=[[IMPLICIT_PARALLEL_ID]]
+ // THREADS-SAME: task_id=[[PARENT_TASK_ID]]
+ // THREADS-NOT: ompt_event_implicit_task_end
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_end
+ // parallel_id is 0 because the region ended in the barrier!
+ // THREADS-SAME: parallel_id=0, task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_end
+ // THREADS-SAME: parallel_id=0, task_id=[[IMPLICIT_TASK_ID]]
+
+ // THREADS: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_thread_begin
+ // THREADS-SAME: thread_type=ompt_thread_worker=2, thread_id=[[THREAD_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_begin
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]]
+ // THREADS-SAME: task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
+ // THREADS: {{^}}[[THREAD_ID]]: task level 0
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: task level 1
+ // THREADS-SAME: parallel_id=[[IMPLICIT_PARALLEL_ID]]
+ // THREADS-SAME: task_id=[[PARENT_TASK_ID]]
+ // THREADS-NOT: ompt_event_implicit_task_end
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_end
+ // parallel_id is 0 because the region ended in the barrier!
+ // THREADS-SAME: parallel_id=0, task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_end
+ // THREADS-SAME: parallel_id=0, task_id=[[IMPLICIT_TASK_ID]]
+
+ // THREADS: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_thread_begin
+ // THREADS-SAME: thread_type=ompt_thread_worker=2, thread_id=[[THREAD_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_begin
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]]
+ // THREADS-SAME: task_id=[[IMPLICIT_TASK_ID:[0-9]+]]
+ // THREADS: {{^}}[[THREAD_ID]]: task level 0
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: task level 1
+ // THREADS-SAME: parallel_id=[[IMPLICIT_PARALLEL_ID]]
+ // THREADS-SAME: task_id=[[PARENT_TASK_ID]]
+ // THREADS-NOT: ompt_event_implicit_task_end
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin
+ // THREADS-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_barrier_end
+ // parallel_id is 0 because the region ended in the barrier!
+ // THREADS-SAME: parallel_id=0, task_id=[[IMPLICIT_TASK_ID]]
+ // THREADS: {{^}}[[THREAD_ID]]: ompt_event_implicit_task_end
+ // THREADS-SAME: parallel_id=0, task_id=[[IMPLICIT_TASK_ID]]
return 0;
}
Modified: openmp/trunk/runtime/test/ompt/tasks/serialized.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/tasks/serialized.c?rev=325922&r1=325921&r2=325922&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/tasks/serialized.c (original)
+++ openmp/trunk/runtime/test/ompt/tasks/serialized.c Fri Feb 23 08:46:25 2018
@@ -119,8 +119,8 @@ int main() {
// CHECK-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
// CHECK-SAME: exit_frame=[[NULL]], reenter_frame=[[NULL]]
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_barrier_end
- // FIXME: parallel_id should be 0 because the region ended in the barrier!
- // CHECK-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]
+ // parallel_id is 0 because the region ended in the barrier!
+ // CHECK-SAME: parallel_id=0, task_id=[[IMPLICIT_TASK_ID]]
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end
// CHECK-SAME: parallel_id=0, task_id=[[IMPLICIT_TASK_ID]]
More information about the Openmp-commits
mailing list