From patchwork Thu Sep 5 00:40:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1158148 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-508335-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="l4ztacUY"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46P20t44mDz9sDB for ; Thu, 5 Sep 2019 10:40:43 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; q=dns; s=default; b=AjN cCdMfmDnsIxzIc/CyRrZyZ9178rdOPu+2jxM7BVbPch1Pdz+XlD/hHcjY9koqFD6 FE6+5mmHskRXMEt86EYipoFkTj01+M6TsGEFJ26gSGujvFSkU7o8QKBRg+TY7z32 LQVPrQywkvyCZdEbVdOFJo+ho32eVyfq8mKtTuAg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=default; bh=pJX2m3/6A u74kmGxTof7D54PJGY=; b=l4ztacUY0wCraXdV3bK3mKJeR3W/ZujBKWP2eebXD ue1XIpA/h7O4iHXwkoHffXMLY4lIESUCuMWVMkuZbdwBzU67bKRqnnugiXm/u3zX knBGt7WxDXQskTJpDJXT5P5w1VBeY2Ci5LxEbze1CkUA72oF1y7dgkLDcLNtD7Pe rk= Received: (qmail 97970 invoked by alias); 5 Sep 2019 00:40:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 97957 invoked by uid 89); 5 Sep 2019 00:40:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.1 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.1 spammy=shortly, 20190905, 2019-09-05, HContent-Transfer-Encoding:8bit X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Sep 2019 00:40:33 +0000 IronPort-SDR: ssxVQko4dysTZtz3gdqnwMqLfDNGptISbMuF/dwSkWK8yC1hzwM/0WveWBm7zcP21gJQLkPRqc VZYq3FER0NfzEABok0A7mKoVZvNktsAii8jkkmrK+MEk8rZRlP88nF7VoknScJfkFbZB/rZVGG aRUBl9Si4S58Gi/MXvJAFnjQKnylkOwfsyMI7fkuUif790bZdKHMhCLBnrWMS1pDxSB0Ps3f6d 0WLZlUaawU1kVHqslEpYZHtB5CiQYST7MJl53kJuGDf0KocD0FVpNc9iZZJIeQI4Jmtylz6f2L lNo= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 04 Sep 2019 16:40:30 -0800 IronPort-SDR: KYaz/djznvwH26REAZis9rgNJbxPSbVMf0iig1LUcetoVsyRUDuvq4I1OiiFmkA1rVEJ89shvJ rgrw5OEv7lSzNrIzgH83un+O5y+DO8kAOG8XmZPRqHnhIODgPzjKAXkW+yl//0SCweeA/0u+f4 u4QhAVKF6GaL9Rqil8S1Vq5n/a06saQY2LnylHWqqWSpeyYqU/nF9KDPYlz79OgjdUwCklqYvk buAnYgNXs2p7NdX1R/gC1Y5sETxN4FB0MKtEVLtdrIiXXiU5jsQgTeNglCbLiPxDXFEwk0WDLY jJo= From: Julian Brown To: CC: Andrew Stubbs Subject: [PATCH] [og9] Fix libgomp.oacc-fortran/lib-13.f90 async bug Date: Wed, 4 Sep 2019 17:40:14 -0700 Message-ID: <20190905004014.37511-1-julian@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes This patch fixes a bug with the lib-13.f90 test -- an asynchronous compute region inside a synchronous data region leads to a data race copying out/unmapping target data. This test failed intermittently for AMD GCN. I will apply to the openacc-gcc-9-branch shortly. Thanks, Julian ChangeLog libgomp/ * testsuite/libgomp.oacc-fortran/lib-13.f90: End data region after wait API calls. --- libgomp/ChangeLog.openacc | 5 +++++ libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libgomp/ChangeLog.openacc b/libgomp/ChangeLog.openacc index f9d8e6ecd39..c7ef40e922c 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-05 Julian Brown + + * testsuite/libgomp.oacc-fortran/lib-13.f90: End data region after + wait API calls. + 2019-08-13 Julian Brown * plugin/plugin-gcn.c (queue_push_callback): Wait on queue-full diff --git a/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 b/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 index da944c35de9..ea35d71b789 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 @@ -19,11 +19,10 @@ program main end do !$acc end parallel end do - !$acc end data call acc_wait_all_async (nprocs + 1) - call acc_wait (nprocs + 1) + !$acc end data if (acc_async_test (1) .neqv. .TRUE.) call abort if (acc_async_test (2) .neqv. .TRUE.) call abort