From patchwork Thu Jul 26 07:58:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 949527 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-482387-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="oO+muFIb"; 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 41bkws4QbVz9ryl for ; Thu, 26 Jul 2018 17:58:03 +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:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=ePz0E8oyJOJbnM2m49KMT00AT1h02eP8o62QCBS9DAwljygQ05 F5hvQ+FICuAxXiDWP9EHGiqPMBtsL+tA/N0GM0+4z91egUzfi5D/O2yBAuEjJRNt jp9bpADnNDq01KpagsyugxORTKCfrSlDS2nSOiDsvanPwp4FPul4FKbtA= 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:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=Vp0lyw7Zg4U8XFriFdB5qng99Uo=; b=oO+muFIbzClsiMriE+Jr DkWY7bMb4rP381wweW3HK5yS2Tp7qa1mjtMYM86wdtWCs2olBKFN77jkmyYQt5wm mkW4htKtH+vluTxe3K8IcZia4gAwGTJ2k8U653sX3KaDF4iZ6daKQyRNTP+Yq/PF yF+0KyQzhCbSidg/pYCJxEA= Received: (qmail 26617 invoked by alias); 26 Jul 2018 07:57:56 -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 26606 invoked by uid 89); 26 Jul 2018 07:57:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Jul 2018 07:57:55 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BD4C1ACC1; Thu, 26 Jul 2018 07:57:52 +0000 (UTC) Date: Thu, 26 Jul 2018 09:58:09 +0200 From: Tom de Vries To: gcc-patches@gcc.gnu.org Cc: Thomas Schwinge Subject: [committed, libgomp, openacc, testsuite] Fix async/wait logic in lib-13.f90 Message-ID: <20180726075809.uqyaqwqn6bssane3@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170912 (1.9.0) X-IsSubscribed: yes Hi, the purpose of the lib-13.f90 test-case is to test acc_wait_all_async. The test indeed calls acc_wait_all_async, but then subsequentlys calls acc_wait_all, so the acc_wait_all_async functionality is not tested. Furthermore, all acc_async_test calls are placed in a location where they are not guaranteed to succeed, which explains why there's an xfail for the lower optimization levels. This patch fixes the problems by replacing acc_wait_all with an acc_wait on the async id used for the acc_wait_all_async call, and moving the acc_async_test calls to the correct locations. Reg-tested on x86_64 with nvptx accelerator. Committed to trunk. Thanks, - Tom [libgomp, openacc, testsuite] Fix async/wait logic in lib-13.f90 2018-07-26 Tom de Vries * testsuite/libgomp.oacc-fortran/lib-13.f90: Replace acc_wait_all with acc_wait. Move acc_async_test calls to correct locations. Remove xfail. --- libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 b/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 index 6d713b1cd95..da944c35de9 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 @@ -1,5 +1,4 @@ ! { dg-do run } -! { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "-O0" "-O1" } { "" } } program main use openacc @@ -22,13 +21,12 @@ program main end do !$acc end data - if (acc_async_test (1) .neqv. .TRUE.) call abort - if (acc_async_test (2) .neqv. .TRUE.) call abort - call acc_wait_all_async (nprocs + 1) - if (acc_async_test (nprocs + 1) .neqv. .TRUE.) call abort + call acc_wait (nprocs + 1) - call acc_wait_all () + if (acc_async_test (1) .neqv. .TRUE.) call abort + if (acc_async_test (2) .neqv. .TRUE.) call abort + if (acc_async_test (nprocs + 1) .neqv. .TRUE.) call abort end program