[gomp4] OpenACC wait directive

Cesar Philippidis cesar@codesourcery.com
Sat Oct 4 22:32:00 GMT 2014


On 10/03/2014 07:34 AM, Cesar Philippidis wrote:
> On 09/24/2014 12:18 AM, Ilmir Usmanov wrote:
>> Hi Cesar!
>>
>> Thank you for the patch!
>>
>> On 24.09.2014 02:29, Cesar Philippidis wrote:
>>> This patch adds support for the async clause in the wait directive in
>>> fortran. It should be pretty straight forward. The fortran FE already
>>> supports the wait directive, but the async clause was introduced to the
>>> wait directive in OpenACC 2.0 and that was missing in gomp-4_0-branch.
>> Yes, I've mostly focused on spec. ver. 1.0.
>>
>>> Is this OK for gomp-4_0-branch?
>> No, it isn't. According to the spec and this presentation:
>> http://www.pgroup.com/lit/presentations/cea-3.pdf (See slide 1-35)
>> it is possible to write construction like:
>> !$acc wait(1) async(2)
>> However, your patch doesn't support this. Also, don't forget to check
>> whether a queue waits itself (for example, wait(1) async(1)).
>> In addition, it breaks current support of the directive (for example,
>> wait(1)).
> 
> Sorry for the delay. I encountered some problems with the runtime in our
> internal branch, and that slowed things down a bit.
> 
> Anyway, you are correct, I broke the optional argument to wait in the
> previous patch. This new patch addresses that and it also make the wait
> construct conform with OpenACC 2.0. Specifically,
> 
>   !$acc wait (1, 2) async (3)
> 
> should behave as ex[ected.
> 
> If you look at gfc_trans_oacc_wait_directive, you'll note that a call to
> GOACC_wait is emitted for the wait directive. Since I had to add a
> runtime library stub for that builtin function, I decided to go ahead an
> include the c front end bits.
> 
> Is this patch OK for gomp-4_0-branch? Julian is working on working on a
> more complete implementation of the runtime. The runtime stub that I
> included is only temporary.

I noticed that I forgot to include the changes to gimplify.c in that
patch. This new patch includes those changes.

Cesar

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wait-gomp4-b.diff
Type: text/x-patch
Size: 53442 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141004/68c885a2/attachment.bin>


More information about the Gcc-patches mailing list