public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Thomas König" <tk@tkoenig.net>
To: Thomas Schwinge <thomas@codesourcery.com>
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'
Date: Thu, 19 Apr 2018 17:59:00 -0000	[thread overview]
Message-ID: <851ddb48-8671-c9b0-c967-61200246bba6@tkoenig.net> (raw)
In-Reply-To: <87d0yvbe53.fsf@hertz.schwinge.homeip.net>

Am 19.04.2018 um 13:59 schrieb Thomas Schwinge:
>> 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).

Well, if the Fortran standard may be relevant after all, let's look
at what it has to say.

J3/10-007

# 8.4 STOP and ERROR STOP statements

# When an image is terminated by a STOP or ERROR STOP statement, its
# stop code, if any, is made available in a processor-dependent manner.

Well, an offloading region is not a Fortran image, but at least it is
something vaguely similar. Also, it is unclear to whom this stop code
is made available. Having said that, the spirit, if not the letter,
of this sentence certainly supports that something other than silently
ignoring the error should be done.

Regards

	Thomas

  reply	other threads:[~2018-04-19 17: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
2018-04-19 17:59         ` Thomas König [this message]
2018-04-25 13:56   ` 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=851ddb48-8671-c9b0-c967-61200246bba6@tkoenig.net \
    --to=tk@tkoenig.net \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=thomas@codesourcery.com \
    --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).