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 via email to