public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: "Thomas König" <tk@tkoenig.net>
Cc: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	gcc-patches	<gcc-patches@gcc.gnu.org>, <vries@gcc.gnu.org>,
	Jakub Jelinek	<jakub@redhat.com>
Subject: Re: PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' (was: [patch, libfortran, committed] Implement stop_numeric for minimal targets)
Date: Thu, 19 Apr 2018 11:59:00 -0000	[thread overview]
Message-ID: <87d0yvbe53.fsf@hertz.schwinge.homeip.net> (raw)
In-Reply-To: <95A48BB1-F36D-40DA-9665-1F670D3ECB2D@tkoenig.net>

Hi!

On Thu, 19 Apr 2018 13:32:16 +0200, Thomas König <tk@tkoenig.net> wrote:
> > Mapping exit to abort is weird,
> 
> For Fortran, this is mapping STOP with a numeric code to abort.
> 
> The Fortran standard does not apply in this case. What does the OpenACC
> standard say about STOP in an offloaded region?

Nothing explicitly, as far as I know.  ;-/ Which means, that this either
a) has to be forbidden, or b) some common sense implementation is called
for.  Well, implicitly it's meant such that "standard Fortran language
usage" is supported inside such offloading regions.  And, as code like:

    !$ACC PARALLEL
    [compute A]
    if (.not. [sanity check computation A]) then
      stop 1
    end if
    [compute B, using A]
    !$ACC END PARALLEL
    [compute C, using A and B]

... certainly is a reasonable thing to support, option b) clearly is
preferrable over option a).  Before my patch, if "[sanity check
computation A]" failed, the offloading region would terminate normally,
without executing "[compute B, using A]", but would then erroneously
"[compute C, using A and B]" with bogus data, so mapping that offloading
region's "stop 1" to "abort" again is an improvement, to make the "sanity
check" error observable.


Grüße
 Thomas

  reply	other threads:[~2018-04-19 11:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04  9:30 [patch, libfortran, committed] Implement stop_numeric for minimal targets Thomas König
2018-04-19  9:06 ` PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' (was: [patch, libfortran, committed] Implement stop_numeric for minimal targets) Thomas Schwinge
2018-04-19  9:36   ` Jakub Jelinek
2018-04-19  9:19     ` Thomas Schwinge
2018-04-19  9:25       ` Jakub Jelinek
2018-04-19  9:36         ` Thomas Schwinge
2018-04-19 11:32     ` Thomas König
2018-04-19 11:59       ` Thomas Schwinge [this message]
2018-04-19 17:59         ` PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' Thomas König
2018-04-25 13:56   ` PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' (was: [patch, libfortran, committed] Implement stop_numeric for minimal targets) Martin Jambor
2018-04-26 10:47     ` PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' Thomas Schwinge
2018-04-26 12:39       ` Martin Jambor
     [not found]   ` <20230119220005.2002779-1-thomas@codesourcery.com>
2023-01-20 20:12     ` Clean up after newlib "nvptx: In offloading execution, map '_exit' to 'abort' [GCC PR85463]" Thomas Schwinge

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=87d0yvbe53.fsf@hertz.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=tk@tkoenig.net \
    --cc=vries@gcc.gnu.org \
    /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).