You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the attach test program compiled with CLANG/LLVM trunk 9 as of a week or two ago, and using an OMP and OMPD built from the "ompd-devices" branch, I ran the following test under TotalView (which has support for LLVM's OMPD library):
Set environment variable OMP_OMPD=on
Set environment variable OMP_NUM_THREADS=1
Set a breakpoint inside the parallel region in "case 0" in function "f" at line 109. (But note that that line actually falls inside the outlined function named "omp_outlined.debug_.10"
Run to the breakpoint.
Here is the (unfiltered) stack trace for the one and only thread in the program at this point:
If I use TotalView to call into the LLVM OMPD library to unwind the parallel regions, and get the task handles and task functions for each one, I see the following TotalView debug output for the OMPD DLL calls it makes.
Get the current parallel handle (0x3b225d0) for the thread (0x3c6a7e0):
NOTICE: The entry_point address returned is 0! Why? I would have expected that the address of "omp_outlined..12", which is 0x00401600. In fact, the compiler passes the "microtask" argument as "omp_outlined..12" into "__kmpc_fork_call" which in turn passes it into "__kmp_fork_call".
NOTICE: Again, 0 is returned. This one seems valid because I suspect that it's related to the "initial parallel region", and that does not correspond to any user code.
Get the next enclosing handle, which I assume fails because we are at the root (though the OMP 5.0 spec doesn't say what's supposed to happen in that case).
If I allow the program to run into more deeply nested parallel regions, I do see valid results returned from ompd_get_task_function() for the innermost parallel regions, but DLL continues to return 0 for the outermost parallel region inside of "f".
Using the attach test program compiled with CLANG/LLVM trunk 9 as of a week or two ago, and using an OMP and OMPD built from the "ompd-devices" branch, I ran the following test under TotalView (which has support for LLVM's OMPD library):
Here is the (unfiltered) stack trace for the one and only thread in the program at this point:
If I use TotalView to call into the LLVM OMPD library to unwind the parallel regions, and get the task handles and task functions for each one, I see the following TotalView debug output for the OMPD DLL calls it makes.
NOTICE: The entry_point address returned is 0! Why? I would have expected that the address of "omp_outlined..12", which is 0x00401600. In fact, the compiler passes the "microtask" argument as "omp_outlined..12" into "__kmpc_fork_call" which in turn passes it into "__kmp_fork_call".
NOTICE: Again, 0 is returned. This one seems valid because I suspect that it's related to the "initial parallel region", and that does not correspond to any user code.
If I allow the program to run into more deeply nested parallel regions, I do see valid results returned from ompd_get_task_function() for the innermost parallel regions, but DLL continues to return 0 for the outermost parallel region inside of "f".
tx_omp_parallel_nested.c.txt
The text was updated successfully, but these errors were encountered: