From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82416 invoked by alias); 25 Apr 2018 13:56:35 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 82316 invoked by uid 89); 25 Apr 2018 13:56:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=MAIN, NONE, H*UA:https, terminate X-Spam-User: qpsmtpd, 3 recipients X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Apr 2018 13:56:30 +0000 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D0AFFAE54; Wed, 25 Apr 2018 13:56:27 +0000 (UTC) From: Martin Jambor To: Thomas Schwinge , Thomas =?utf-8?Q?K=C3=B6nig?= , "fortran\@gcc.gnu.org" , gcc-patches Cc: vries@gcc.gnu.org Cc: Subject: Re: PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' (was: [patch, libfortran, committed] Implement stop_numeric for minimal targets) In-Reply-To: <87in8nsgz9.fsf@euler.schwinge.homeip.net> References: <751060e1-67cb-d290-4fd1-46b15b77fc1a@tkoenig.net> <87in8nsgz9.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.26 (https://notmuchmail.org) Emacs/25.3.1 (x86_64-suse-linux-gnu) Date: Wed, 25 Apr 2018 13:56:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-04/txt/msg00115.txt.bz2 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 > 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