Skip to content

Commit 6c6d334

Browse files
committed
[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).
1 parent 4451f9f commit 6c6d334

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

openmp/runtime/src/kmp_tasking.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5491,7 +5491,8 @@ static kmp_tdg_info_t *__kmp_find_tdg(kmp_int32 tdg_id) {
54915491

54925492
// __kmp_print_tdg_dot: prints the TDG to a dot file
54935493
// tdg: ID of the TDG
5494-
void __kmp_print_tdg_dot(kmp_tdg_info_t *tdg) {
5494+
// gtid: Global Thread ID
5495+
void __kmp_print_tdg_dot(kmp_tdg_info_t *tdg, kmp_int32 gtid) {
54955496
kmp_int32 tdg_id = tdg->tdg_id;
54965497
KA_TRACE(10, ("__kmp_print_tdg_dot(enter): T#%d tdg_id=%d \n", gtid, tdg_id));
54975498

@@ -5693,7 +5694,7 @@ void __kmp_end_record(kmp_int32 gtid, kmp_tdg_info_t *tdg) {
56935694
KMP_ATOMIC_ST_RLX(&__kmp_tdg_task_id, 0);
56945695

56955696
if (__kmp_tdg_dot)
5696-
__kmp_print_tdg_dot(tdg);
5697+
__kmp_print_tdg_dot(tdg, gtid);
56975698
}
56985699

56995700
// __kmpc_end_record_task: wrapper around __kmp_end_record to mark

0 commit comments

Comments
 (0)