[Openmp-dev] Interoperability with C++ coroutines

Jeff Hammond via Openmp-dev openmp-dev at lists.llvm.org
Mon Feb 11 14:07:28 PST 2019


Please look at
https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5.0.pdf
and search for "longjmp".

I do not know if/when coroutines will ever be considered by the OpenMP
specification.  That will be up to the OpenMP standards group rather than
the LLVM OpenMP implementers, although there is nontrivial overlap between
the two groups.

As for your segfault, it's impossible to diagnose this without code.

Jeff

On Mon, Feb 11, 2019 at 1:56 PM yongkee kwon <yongkee.kwon at gmail.com> wrote:

> That is an actually good mental model to treat coroutines as control
> manipulation such as goto/longjmp. Could you please refer to where OpenMP
> specification says about them?
>
> I wrote a few simple code with coroutines in a canonical loop form and
> ended up with a segmentation fault somewhere in outlined code. So I was
> wondering if there is any plan to incorporate them.
>
> Thanks,
> Yongkee
>
> On Mon, Feb 11, 2019 at 11:00 AM Jeff Hammond <jeff.science at gmail.com>
> wrote:
>
>> The OpenMP specification does define interoperability with any other
>> threading model.  Implementations may provide interoperability of some
>> variants, which is derived from the use of OS threads (e.g. POSIX threads)
>> as the foundation for OpenMP and other models.
>>
>> If your use of coroutines is completely distinct from OpenMP, it is
>> possible that things will not break, but I can imagine many thinks could go
>> wrong if you try to use them together.
>>
>> One possible way to reason about interoperability is to treat coroutines
>> as structure goto and see what the OpenMP specification says about
>> goto/longjmp, but this is at best a necessary but insufficient to
>> understand the interaction of coroutines and OpenMP.
>>
>> Jeff
>>
>> On Sat, Feb 9, 2019 at 12:03 AM yongkee kwon via Openmp-dev <
>> openmp-dev at lists.llvm.org> wrote:
>>
>>> Hi,
>>>
>>> Is the latest runtime and compiler for OpenMP interoperable with C++
>>> coroutine TS? For example, what if I have a coroutine along with
>>> work-sharing directives?
>>>
>>> I remember there was a discussion in OpenMP Interoperability language
>>> subcommittee and I'd like to ask about the current status
>>> for Interoperability with C++ coroutine TS.
>>>
>>> Thanks,
>>> Yongkee
>>> _______________________________________________
>>> Openmp-dev mailing list
>>> Openmp-dev at lists.llvm.org
>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>>>
>>
>>
>> --
>> Jeff Hammond
>> jeff.science at gmail.com
>> http://jeffhammond.github.io/
>>
>

-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20190211/87809886/attachment.html>


More information about the Openmp-dev mailing list