Skip to content

Commit 5b0e5b7

Browse files
committed
[OpenMP] Clean up taskwait bug demonstration code
This patch removes the extra instrumentation to demonstrate the taskwait bug described in previous patches. All three patches can be committed together to reduce churn.
1 parent 3a89d15 commit 5b0e5b7

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

openmp/runtime/src/kmp.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2556,9 +2556,6 @@ typedef struct kmp_base_depnode {
25562556
#endif
25572557
std::atomic<kmp_int32> npredecessors;
25582558
std::atomic<kmp_int32> nrefs;
2559-
#if KMP_DEBUG
2560-
void *on_stack;
2561-
#endif
25622559
} kmp_base_depnode_t;
25632560

25642561
union KMP_ALIGN_CACHE kmp_depnode {

openmp/runtime/src/kmp_taskdeps.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ static void __kmp_init_node(kmp_depnode_t *node) {
4848
#if USE_ITT_BUILD && USE_ITT_NOTIFY
4949
__itt_sync_create(node, "OMP task dep node", NULL, 0);
5050
#endif
51-
#if KMP_DEBUG
52-
node->dn.on_stack = NULL;
53-
#endif
5451
}
5552

5653
static inline kmp_depnode_t *__kmp_node_ref(kmp_depnode_t *node) {

openmp/runtime/src/kmp_taskdeps.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,12 @@ static inline void __kmp_node_deref(kmp_info_t *thread, kmp_depnode_t *node) {
2222
if (!node)
2323
return;
2424

25-
#if KMP_DEBUG
26-
if (node->dn.on_stack && node->dn.on_stack != thread)
27-
fprintf (stderr, "on-stack depnode moved from thread %p to thread %p\n",
28-
node->dn.on_stack, thread);
29-
#endif
30-
3125
kmp_int32 n = KMP_ATOMIC_DEC(&node->dn.nrefs) - 1;
3226
KMP_DEBUG_ASSERT(n >= 0);
3327
if (n == 0) {
3428
#if USE_ITT_BUILD && USE_ITT_NOTIFY
3529
__itt_sync_destroy(node);
3630
#endif
37-
KMP_DEBUG_ASSERT(!node->dn.on_stack);
3831
KMP_ASSERT(node->dn.nrefs == 0);
3932
#if USE_FAST_MEMORY
4033
__kmp_fast_free(thread, node);

0 commit comments

Comments
 (0)