[Openmp-dev] Status of detached tasks in Clang
Joseph Schuchart via Openmp-dev
openmp-dev at lists.llvm.org
Wed Apr 8 05:02:52 PDT 2020
Johannes, Alexey,
Thanks for the pointers. I will try to call in to the telco tomorrow.
In the meantime: I was able to install trunk and run tests with detached
tasks. However, every once in a while I end up in an assert inside libomp:
OMP: Error #13: Assertion failure at kmp_tasking.cpp(920).
The relevant code is in __kmp_task_finish:
if (taskdata->td_flags.destructors_thunk) {
kmp_routine_entry_t destr_thunk = task->data1.destructors;
KMP_ASSERT(destr_thunk); // <- this assert triggers
destr_thunk(gtid, task);
}
My first suspicion is that there is a race condition when one thread
fulfills the event while the executing task completes it. I have not
been able to spot this issue in the code but maybe someone familiar with
it has an idea about what might be going wrong?
Thanks,
Joseph
On 4/4/20 6:20 PM, Johannes Doerfert wrote:
> Hi Joseph,
>
>
> I'm not sure who is working on this but we might be able to figure this
> out on our bi-weekly call Wednesday.
>
> Feel free to call but we should figure this out either way.
>
>
> Apologies for the delay,
>
> Johannes
>
>
>
> On 4/3/20 7:18 AM, Joseph Schuchart via Openmp-dev wrote:
>> Dear all,
>>
>> I am eager to play around with detached tasks in OpenMP. It seems that
>> support has gone into the runtime about a year ago [1] but even with
>> Clang 10 I get a warning that the detach clause is ignored:
>>
>> $ clang-10 -fopenmp test_detached.c
>> test_detached.c:25:47: warning: extra tokens at the end of '#pragma
>> omp task' are ignored [-Wextra-tokens]
>> #pragma omp task detach(event)
>>
>> The status website lists detached tasks as work in progress [2]. Is
>> there a way to try detached tasks in some experimental version of
>> Clang? Or am I just missing a flag to enable them in the Clang release?
>>
>> Thanks a lot,
>> Joseph
>>
>> [1] https://reviews.llvm.org/D62485
>> [2] https://clang.llvm.org/docs/OpenMPSupport.html
>> _______________________________________________
>> Openmp-dev mailing list
>> Openmp-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
More information about the Openmp-dev
mailing list