From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15987 invoked by alias); 26 Apr 2018 10:47: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 15953 invoked by uid 89); 26 Apr 2018 10:47:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-24.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=gr, gr=c3=bc=c3, HCC:D*net, HCC:D*gnu.org?= X-Spam-User: qpsmtpd, 3 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Apr 2018 10:47:33 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1fBeQz-0002oK-HQ from Thomas_Schwinge@mentor.com ; Thu, 26 Apr 2018 03:47:29 -0700 Received: from hertz.schwinge.homeip.net (137.202.0.87) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 26 Apr 2018 11:47:26 +0100 From: Thomas Schwinge To: Martin Jambor CC: , Thomas =?utf-8?Q?K=C3=B6nig?= , "fortran@gcc.gnu.org" , gcc-patches Subject: Re: PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' In-Reply-To: References: <751060e1-67cb-d290-4fd1-46b15b77fc1a@tkoenig.net> <87in8nsgz9.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Thu, 26 Apr 2018 10:47:00 -0000 Message-ID: <87zi1q9rd5.fsf@hertz.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2018-04/txt/msg00117.txt.bz2 Hi Martin! On Wed, 25 Apr 2018 15:56:26 +0200, Martin Jambor 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. >=20 > 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: >=20 > > diff --git libgomp/testsuite/libgomp.oacc-fortran/error_stop-1.f libgom= p/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 "" } >=20 > 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=C3=BC=C3=9Fe Thomas