From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57958 invoked by alias); 19 Apr 2018 11:59:53 -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 57908 invoked by uid 89); 19 Apr 2018 11:59:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= 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, 19 Apr 2018 11:59:45 +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 1f98E2-0004HP-Cs from Thomas_Schwinge@mentor.com ; Thu, 19 Apr 2018 04:59:42 -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, 19 Apr 2018 12:59:38 +0100 From: Thomas Schwinge To: Thomas =?utf-8?Q?K=C3=B6nig?= CC: "fortran@gcc.gnu.org" , gcc-patches , , Jakub Jelinek 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: <95A48BB1-F36D-40DA-9665-1F670D3ECB2D@tkoenig.net> References: <751060e1-67cb-d290-4fd1-46b15b77fc1a@tkoenig.net> <87in8nsgz9.fsf@euler.schwinge.homeip.net> <20180419091438.GX8577@tucnak> <95A48BB1-F36D-40DA-9665-1F670D3ECB2D@tkoenig.net> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Thu, 19 Apr 2018 11:59:00 -0000 Message-ID: <87d0yvbe53.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/msg00105.txt.bz2 Hi! On Thu, 19 Apr 2018 13:32:16 +0200, Thomas K=C3=B6nig wrot= e: > > Mapping exit to abort is weird, >=20 > For Fortran, this is mapping STOP with a numeric code to abort. >=20 > 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). Before my patch, if "[sanity check computation A]" failed, the offloading region would terminate normally, without executing "[compute B, using A]", but would then erroneously "[compute C, using A and B]" with bogus data, so mapping that offloading region's "stop 1" to "abort" again is an improvement, to make the "sanity check" error observable. Gr=C3=BC=C3=9Fe Thomas