From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98647 invoked by alias); 19 Apr 2018 17:59:31 -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 98606 invoked by uid 89); 19 Apr 2018 17:59:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=whom, 19042018, 19.04.2018, letter X-Spam-User: qpsmtpd, 3 recipients X-HELO: mo4-p01-ob.smtp.rzone.de Received: from mo4-p01-ob.smtp.rzone.de (HELO mo4-p01-ob.smtp.rzone.de) (81.169.146.166) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Apr 2018 17:59:28 +0000 X-RZG-AUTH: :OGckYUunfvGNVUL0FlRnC4eRM+bOwx0tUtYTrJ/xeZX+ZVZvrbiROUdgOW6adEk= X-RZG-CLASS-ID: mo00 Received: from [192.168.178.68] by smtp.strato.de (RZmta 43.4 DYNA|AUTH) with ESMTPSA id 003883u3JHxM2cS (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 19 Apr 2018 19:59:22 +0200 (CEST) Subject: Re: PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' To: Thomas Schwinge Cc: "fortran@gcc.gnu.org" , gcc-patches , vries@gcc.gnu.org, Jakub Jelinek References: <751060e1-67cb-d290-4fd1-46b15b77fc1a@tkoenig.net> <87in8nsgz9.fsf@euler.schwinge.homeip.net> <20180419091438.GX8577@tucnak> <95A48BB1-F36D-40DA-9665-1F670D3ECB2D@tkoenig.net> <87d0yvbe53.fsf@hertz.schwinge.homeip.net> From: =?UTF-8?Q?Thomas_K=c3=b6nig?= Message-ID: <851ddb48-8671-c9b0-c967-61200246bba6@tkoenig.net> Date: Thu, 19 Apr 2018 17:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <87d0yvbe53.fsf@hertz.schwinge.homeip.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-04/txt/msg00107.txt.bz2 Am 19.04.2018 um 13:59 schrieb Thomas Schwinge: >> 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). Well, if the Fortran standard may be relevant after all, let's look at what it has to say. J3/10-007 # 8.4 STOP and ERROR STOP statements # When an image is terminated by a STOP or ERROR STOP statement, its # stop code, if any, is made available in a processor-dependent manner. Well, an offloading region is not a Fortran image, but at least it is something vaguely similar. Also, it is unclear to whom this stop code is made available. Having said that, the spirit, if not the letter, of this sentence certainly supports that something other than silently ignoring the error should be done. Regards Thomas