public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: "Thomas Schwinge" <thomas@codesourcery.com>,
	"Thomas König" <tk@tkoenig.net>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Cc: vries@gcc.gnu.org
Subject: Re: PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' (was: [patch, libfortran, committed] Implement stop_numeric for minimal targets)
Date: Wed, 25 Apr 2018 13:56:00 -0000	[thread overview]
Message-ID: <ri6zi1r2xv9.fsf@suse.cz> (raw)
In-Reply-To: <87in8nsgz9.fsf@euler.schwinge.homeip.net>

Hi,

On Thu, Apr 19 2018, Thomas Schwinge wrote:
>
> Per PR85463 '[nvptx] "exit" in offloaded region doesn't terminate
> process' that I just filed, we currently have to use "abort" instead of
> "exit" for nvptx offloading, so I have applied the following in trunk
> r259491, where I completed this by adding and testing stop_string,
> error_stop_string, and error_stop_numeric functions, too.
>
> commit 6bc09e4fa2e5e59dee18f1c03f2d6529b9b0045b
> Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date:   Thu Apr 19 08:53:38 2018 +0000
>
>     PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process'
>     
>             libgomp/
>             PR libfortran/85166
>             * testsuite/libgomp.oacc-fortran/abort-1.f90: Switch back to "call
>             abort".
>             * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
>     
>             libgfortran/
>             PR libfortran/85166
>             PR libgomp/85463
>             * runtime/minimal.c (stop_numeric): Reimplement.
>             (stop_string, error_stop_string, error_stop_numeric): New
>             functions.
>             libgomp/
>             PR libgomp/85463
>             * 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, only host
fallback is used.  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).  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?

Thanks,

Martin

  parent reply	other threads:[~2018-04-25 13:56 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   ` Martin Jambor [this message]
2018-04-26 10:47     ` 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=ri6zi1r2xv9.fsf@suse.cz \
    --to=mjambor@suse.cz \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=thomas@codesourcery.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).