[Openmp-dev] Status of detached tasks in Clang

Joseph Schuchart via Openmp-dev openmp-dev at lists.llvm.org
Wed Apr 8 09:47:34 PDT 2020


Alexey,

I am having a hard time trying to come up with a simple reproducer. 
However, I got hit by an issue that looks similar to what I reported a 
while ago:
https://bugs.llvm.org/show_bug.cgi?id=37671

I updated it with a simpler reproducer. Maybe this issue causes havoc in 
my actual application and leads to the assert somehow. Maybe someone can 
take a look at that #37671 now with the simpler test case?

I will try and work a reproducer for the assert and report back if I 
find one.

Cheers
Joseph

On 4/8/20 2:15 PM, Alexey.Bataev wrote:
> Hi Joseph, do you have a reproducer? I'll try to reproduce it myself but 
> it would be better if you could provide one.
> 
> -------------
> Best regards,
> Alexey Bataev
> 
> 08.04.2020 8:02 AM, Joseph Schuchart via Openmp-dev пишет:
>> 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
>> _______________________________________________
>> 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