public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Martin Jambor <mjambor@suse.cz>
Cc: vries@gcc.gnu.org, "Thomas König" <tk@tkoenig.net>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process'
Date: Thu, 26 Apr 2018 10:47:00 -0000	[thread overview]
Message-ID: <87zi1q9rd5.fsf@hertz.schwinge.homeip.net> (raw)
In-Reply-To: <ri6zi1r2xv9.fsf@suse.cz>

Hi Martin!

On Wed, 25 Apr 2018 15:56:26 +0200, Martin Jambor <mjambor@suse.cz> wrote:
> On Thu, Apr 19 2018, Thomas Schwinge wrote:
> >             * testsuite/libgomp.oacc-fortran/error_stop-1.f: New file.
> >             * testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise.
> >             * testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise.
> >             * testsuite/libgomp.oacc-fortran/stop-1.f: Likewise.
> >             * testsuite/libgomp.oacc-fortran/stop-2.f: Likewise.
> >             * testsuite/libgomp.oacc-fortran/stop-3.f: Likewise.
> 
> The "output pattern test" part of all of these new testcases fail on my
> HSA tester even though no HSAIL is generated for them

(Right, that's expected: there's currently no HSA/HSAIL support for
OpenACC constructs.)

> only host
> fallback is used.

So that's essentially the configuration that a lot of people use: libgomp
testing with no offloading configured; host fallback only.

> Looking at the first one:
> 
> > diff --git libgomp/testsuite/libgomp.oacc-fortran/error_stop-1.f libgomp/testsuite/libgomp.oacc-fortran/error_stop-1.f
> > new file mode 100644
> > index 0000000..4965e67
> > --- /dev/null
> > +++ libgomp/testsuite/libgomp.oacc-fortran/error_stop-1.f
> > @@ -0,0 +1,20 @@
> > +! { dg-do run }
> > +
> > +      PROGRAM MAIN
> > +      IMPLICIT NONE
> > +
> > +      PRINT *, "CheCKpOInT"
> > +!$ACC PARALLEL
> > +      ERROR STOP
> > +!$ACC END PARALLEL
> > +      PRINT *, "WrONg WAy"
> > +
> > +      END PROGRAM MAIN
> > +
> > +! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
> > +! { dg-output "ERROR STOP (\n|\r\n|\r)+" }
> > +! PR85463.  The "minimal" libgfortran implementation used with nvptx
> > +! offloading is a little bit different.
> > +! { dg-output "Error termination.*" { target { ! openacc_nvidia_accel_selected } } }
> > +! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
> > +! { dg-shouldfail "" }
> 
> I can tell that checking for "CheCKpOInT" passes but checking for "ERROR
> STOP" and "Error termination" do not.  Running the test manually, they
> both appear, but in standard error, not standard output (where
> CheCKpOInT is printed).

ACK (stdout, then stderr).  Though, as there are no "FAIL" reports so far
(including posts on the gcc-regression and gcc-testresults mailing
lists), I'm assuming that stdout/stderr do synchronize in order here, as
expected.  (As far as I remember, the Fortran PRINT does flush stdout.)

> I am not 100% sure whether that is the reason
> why they fail but do we have a way of testing std error of the executed
> compiled binary?

Is there anything "special" in your HSA machine regarding stdout/stderr?
How are you testing GCC there: native testing or some non-standard *.exp
file, for example?  Does using strace give any idea where which part of
the output is going?


Grüße
 Thomas

  reply	other threads:[~2018-04-26 10:47 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         ` 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     ` Thomas Schwinge [this message]
2018-04-26 12:39       ` PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' 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=87zi1q9rd5.fsf@hertz.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mjambor@suse.cz \
    --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).