From: Jakub Jelinek <jakub@redhat.com>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, fortran <fortran@gcc.gnu.org>
Subject: Re: [Patch] Fortran/openmp: Fix '!$omp end'
Date: Fri, 12 Nov 2021 13:02:34 +0100 [thread overview]
Message-ID: <20211112120234.GB2710@tucnak> (raw)
In-Reply-To: <f8ea4e1b-5129-d166-11a5-4e6ff5c8b3c3@codesourcery.com>
On Fri, Nov 12, 2021 at 12:01:27PM +0100, Tobias Burnus wrote:
> With the attached patch, the following combined/composite
> directives accept 'nowait' at 'end':
I've filed https://github.com/OpenMP/spec/issues/3184 because
I think OpenMP 5.2 got it wrong (and 5.1 got it wrong for
the end directives in many other cases too).
I believe the general rule should be:
1) non-combined/composite constructs allow nowait when
they mention the clause (critical, for/do, scope, sections, single,
workshare)
2) for simd, do simd allow it
3) anything combined with target allows it
So:
>
> "end critical"
> "end do simd"
> "end do"
> "end scope"
> "end sections"
> "end single"
> "end target parallel" (newly permits nowait)
> "end target simd" (newly permits nowait)
> "end target teams distribute simd" (newly permits nowait)
> "end target teams distribute" (newly permits nowait)
> "end target teams loop" (newly permits nowait)
> "end target teams" (newly permits nowait)
> "end target"
> "end workshare"
is ok, but:
> and the following don't
>
> "end target parallel do simd"
> "end target parallel do"
> "end target parallel loop" (was completely missing before)
> "end target teams distribute parallel do simd"
> "end target teams distribute parallel do"
The above 5 should allow it too.
As per e.g. 5.2 [341:23],
"The effect of the nowait clause is as if it is applied to the
outermost leaf construct that permits it."
so even for the above 5 the clause splitting should put
nowait on target and not the others and be done with it.
Jakub
next prev parent reply other threads:[~2021-11-12 12:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 17:11 Tobias Burnus
2021-11-11 18:01 ` Jakub Jelinek
2021-11-12 11:01 ` Tobias Burnus
2021-11-12 12:02 ` Jakub Jelinek [this message]
2021-11-12 15:56 ` Tobias Burnus
2021-11-12 16:07 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211112120234.GB2710@tucnak \
--to=jakub@redhat.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=tobias@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).