[OMPT] fix __ompt_get_teaminfo to consult lwt entries of parent teams
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>
Wed, 14 Sep 2016 13:59:24 +0000 (13:59 +0000)
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>
Wed, 14 Sep 2016 13:59:24 +0000 (13:59 +0000)
commit28ea24bba7da254f12a8f3d1f83c250cac274766
tree7d2c12da07b27f68e9e1bacbd302f38825826e3d
parent8a27064e05c0327790c5144bf8498ca4a68152da
[OMPT] fix __ompt_get_teaminfo to consult lwt entries of parent teams

The comment already states, that this function should work similarly as __ompt_get_taskinfo.

The function only looked for lwt entries of the current team, but not when unrolling the parents. This fix aligns the implementation to __ompt_get_taskinfo.

The new test case creates a single theaded team (->lwt) and then a nested active team.
Before the innermost print_id(1) would deliver a different team then the outer print_id(0).

Patch by Joachim Protze!

Differential Revision: https://reviews.llvm.org/D23309

llvm-svn: 281466
openmp/runtime/src/ompt-specific.c
openmp/runtime/test/ompt/parallel/nested_lwt.c [new file with mode: 0644]