This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][OMPT][GOMP] task frame support in KMP_API_NAME_GOMP_PARALLEL_SECTIONS
ClosedPublic

Authored by vladaindjic on Oct 21 2021, 2:13 AM.

Details

Summary

KMP_API_NAME_GOMP_PARALLEL_SECTIONS function was missing the task frame support.
This patch introduced a fix responsible to set properly the exit_frame of
the innermost implicit task that corresponds to the parallel section construct,
as well as the enter_frame of the task that encloses the mentioned implicit task.

This patch also introduced a simple test case sections_serialized.c that contains
serialized parallel section construct and validates whether the mentioned
task frames are set correctly.

Diff Detail

Event Timeline

vladaindjic created this revision.Oct 21 2021, 2:13 AM
vladaindjic requested review of this revision.Oct 21 2021, 2:13 AM
Herald added a project: Restricted Project. · View Herald Transcript
jlpeyton added inline comments.Oct 21 2021, 6:50 AM
openmp/runtime/test/ompt/worksharing/taskinfo/sections_serialized.c
9

Can we not use print_ids() from callback.h?

31

Use `#include "ompt-signal.h" and the wait and signal functions inside that header.

As @jlpeyton suggessted, the following is done:

  • Unnecessary code has been removed from sections_serialized.c test case
  • print_ids is used inside the same test case.
This revision is now accepted and ready to land.Oct 21 2021, 12:19 PM
vladaindjic marked 2 inline comments as done.Oct 21 2021, 2:53 PM
This comment was removed by vladaindjic.
openmp/runtime/test/ompt/worksharing/taskinfo/sections_serialized.c
31

This is some old code, which I'll remove. It is not necessary for the test case.

vladaindjic marked an inline comment as done.Oct 21 2021, 2:54 PM

@jlpeyton Thank you a lot for the review. Could you please land this patch for me?