OpenMPToolsInterface / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org.
http://llvm.org
2 stars 4 forks source link

OMPD parallel-end events are not getting triggered #7

Closed jinisusan closed 4 years ago

jinisusan commented 4 years ago

Modifications done for positioning ompd_bp_parallel_end() correctly, so that the current parallel handle reflects the parallel region that is terminating, and the current task is the task that encountered the parallel construct when the parallel-event is encountered. The changes also include:

  1. Adjusting the positions of the __kmp_pop_current_task_from_thread() invocation and the nested level reduction in __kmpc_end_serialized_parallel.
  2. Removing the incorrect placement of ompd_bp_parallel_end() in __kmp_fork_call().
  3. Moving the task unlinking before the team unlinking in __ompt_lw_taskteam_unlink() so that ompd_bp_parallel_end() can be positioned in between.

There are some issues pending with nested inactive regions, most of which are related to the lightweight task team structure not getting stored into ompt_serialized_team_info for the first serialized team in __ompt_lw_taskteam_link(). (lines 305 onwards). These will be dealt with separately.

jinisusan commented 4 years ago

Gentle reminder, @jprotze !

Thanks.

jprotze commented 4 years ago

lgtm