llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Orphaned task reduction should be allowed.

Open AndreyChurbanov opened this issue 6 years ago • 1 comments

Bugzilla Link 45117
Resolution FIXED
Resolved on Mar 27, 2020 15:10
Version unspecified
OS Linux
Attachments Bug reproducer.
CC @alexey-bataev
Fixed by commit(s) 0fca766458da04bbc6d33b3f9ecd57e615c556c1

Extended Description

OpenMP specification allows task reduction to be orphaned. Issue reported by Olivier, Stephen Lecler (SNL), and confirmed by other members of OpenMP language committee.

Blog article link: https://developers.redhat.com/blog/2019/03/19/whats-new-in-openmp-5-0/

To reproduce:

$ clang -fopenmp omp_task_red_orphaned.c omp_task_red_orphaned.c:14:35: error: in_reduction variable must appear in a task_reduction clause #pragma omp task in_reduction(+:r) firstprivate(i, th_gen) ^ omp_task_red_orphaned.c:19:35: error: in_reduction variable must appear in a task_reduction clause #pragma omp task in_reduction(+:r) firstprivate(i, th_gen) ^ 2 errors generated.

There is also corresponding bug in the runtime library prevented the test to run to completion, the fix for which posted for review: https://reviews.llvm.org/D75673.

AndreyChurbanov avatar Mar 05 '20 12:03 AndreyChurbanov

The runtime bug fixed by commit https://reviews.llvm.org/rGae044467ede146556b6a424f4486ebbbc920e95f, so nothing blocks the clang to be fixed now.

AndreyChurbanov avatar Mar 24 '20 15:03 AndreyChurbanov