[Openmp-commits] [openmp] [OpenMP] Fix missing gtid argument in __kmp_print_tdg_dot function (PR #111986)
Josep Pinot via Openmp-commits
openmp-commits at lists.llvm.org
Fri Oct 11 05:04:05 PDT 2024
https://github.com/jpinot created https://github.com/llvm/llvm-project/pull/111986
This patch modifies the signature of the `__kmp_print_tdg_dot` function in `kmp_tasking.cpp` to include the global thread ID (gtid) as an argument. The gtid is now correctly passed to the function.
- Updated the function declaration to accept the gtid parameter.
- Modified all calls to `__kmp_print_tdg_dot` to pass the correct gtid value.
This change addresses issues encountered when compiling with `OMPX_TASKGRAPH` enabled. No functional changes are expected beyond successful compilation.
>From 6c6d334497bf01d2f72261092a0ee00409ce01b6 Mon Sep 17 00:00:00 2001
From: jpinot <josep.pinot at bsc.es>
Date: Fri, 11 Oct 2024 13:47:46 +0200
Subject: [PATCH] [OpenMP] Fix missing input argument in __kmp_print_tdg_dot
function
Modified __kmp_print_tdg_dot to accept the global thread ID (gtid).
Updated all calls to pass the gtid, ensuring correct task
identification when printing the task dependency graph (TDG).
---
openmp/runtime/src/kmp_tasking.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/openmp/runtime/src/kmp_tasking.cpp b/openmp/runtime/src/kmp_tasking.cpp
index 7edaa8e127e52c..932799e133b45b 100644
--- a/openmp/runtime/src/kmp_tasking.cpp
+++ b/openmp/runtime/src/kmp_tasking.cpp
@@ -5491,7 +5491,8 @@ static kmp_tdg_info_t *__kmp_find_tdg(kmp_int32 tdg_id) {
// __kmp_print_tdg_dot: prints the TDG to a dot file
// tdg: ID of the TDG
-void __kmp_print_tdg_dot(kmp_tdg_info_t *tdg) {
+// gtid: Global Thread ID
+void __kmp_print_tdg_dot(kmp_tdg_info_t *tdg, kmp_int32 gtid) {
kmp_int32 tdg_id = tdg->tdg_id;
KA_TRACE(10, ("__kmp_print_tdg_dot(enter): T#%d tdg_id=%d \n", gtid, tdg_id));
@@ -5693,7 +5694,7 @@ void __kmp_end_record(kmp_int32 gtid, kmp_tdg_info_t *tdg) {
KMP_ATOMIC_ST_RLX(&__kmp_tdg_task_id, 0);
if (__kmp_tdg_dot)
- __kmp_print_tdg_dot(tdg);
+ __kmp_print_tdg_dot(tdg, gtid);
}
// __kmpc_end_record_task: wrapper around __kmp_end_record to mark
More information about the Openmp-commits
mailing list