From 005837f44122448a04de98f4e0b00d96ae1e7aa3 Mon Sep 17 00:00:00 2001 From: Jini Susan Date: Thu, 4 Jun 2020 23:39:10 +0530 Subject: [PATCH 1/2] Fix for: The entry point address of the implicit task associated with a serialized parallel region is -1 -- causing the entry point address in ompd_get_task_function to be set incorrectly to -1. --- openmp/runtime/src/kmp_runtime.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp index f0ddadb1f8214..46463413e21d3 100644 --- a/openmp/runtime/src/kmp_runtime.cpp +++ b/openmp/runtime/src/kmp_runtime.cpp @@ -1733,6 +1733,10 @@ int __kmp_fork_call(ident_t *loc, int gtid, __kmpc_serialized_parallel(loc, gtid); +#if OMPD_SUPPORT + master_th->th.th_serial_team->t.t_pkfn = microtask; +#endif + if (call_context == fork_context_intel) { /* TODO this sucks, use the compiler itself to pass args! :) */ master_th->th.th_serial_team->t.t_ident = loc; From 19225e1c9015a57e14aa9b4abe5d1f017fdddf5f Mon Sep 17 00:00:00 2001 From: Jini Susan Date: Wed, 10 Jun 2020 10:16:43 +0530 Subject: [PATCH 2/2] Addressed review comments: modified t_pkfn of the implicit task associated with a serialized parallel region inside a teams construct to point to the right microtask --- openmp/runtime/src/kmp_runtime.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp index 46463413e21d3..d4a6c68680749 100644 --- a/openmp/runtime/src/kmp_runtime.cpp +++ b/openmp/runtime/src/kmp_runtime.cpp @@ -1521,6 +1521,10 @@ int __kmp_fork_call(ident_t *loc, int gtid, __kmpc_serialized_parallel(loc, gtid); KMP_DEBUG_ASSERT(parent_team->t.t_serialized > 1); +#if OMPD_SUPPORT + parent_team->t.t_pkfn = microtask; +#endif + #if OMPT_SUPPORT void *dummy; void **exit_frame_p;