From patchwork Thu Jun 18 14:28:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 486326 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 793AA1401DA for ; Fri, 19 Jun 2015 00:28:35 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=h4uetPmN; dkim-atps=neutral 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:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=GbSy5ChraZuibGsM chnp6A+VWiwvDmd4Xop9P+Gkg+40Plu+CwsR607BuMGqI4r4rJiSfnGa8HWOn0YS C/PrfDwNGWgeBjv91JFnWkjAijmrl/DeOGASNWFWpCGQts54CRTKR98lHy6xqEyh 7CqN9yyeoAB0inI9YRUgeHHqh1M= 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:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=t7i3zFoxiWr9P0PX9Dl/ax qnhRI=; b=h4uetPmN1DKd/4xrl843YEbjxDuqJn/bk2K52Qnyuf0c8TZkbu2TEC MNv2hJ/60xhrn0Gi25jlqDdbCC+XHolgvGJWCzYWB6yWw1EdUYgU1qoqVsNwapsw DrHUknPcvHMWgP+QamyCzORYf/nNNmUUZCELFQ7DIebfV3fKV6z+s= Received: (qmail 94126 invoked by alias); 18 Jun 2015 14:28:28 -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 94115 invoked by uid 89); 18 Jun 2015 14:28:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 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, 18 Jun 2015 14:28:21 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Z5anh-00062L-8o from Thomas_Schwinge@mentor.com for gcc-patches@gcc.gnu.org; Thu, 18 Jun 2015 07:28:17 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Thu, 18 Jun 2015 15:28:15 +0100 From: Thomas Schwinge To: Julian Brown , Cesar Philippidis , Bernd Schmidt CC: , Subject: Re: [gomp4] Tests for private variables/state propagation In-Reply-To: <20150617151515.087aa93e@octopus> References: <20150617151515.087aa93e@octopus> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) Date: Thu, 18 Jun 2015 16:28:08 +0200 Message-ID: <87zj3xccqv.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Wed, 17 Jun 2015 15:15:15 +0100, Julian Brown wrote: > This is a set of tests for OpenACC private variable/state propagation > support in GCC. The associated functionality is a work-in-progress: as > such, many of these tests do not pass yet (causing incorrect results, > ICEs or even bogus assembly output). I believe the tests to be valid > OpenACC, though it's possible I misinterpreted the spec at some points! > > I will apply to the gomp4 branch shortly. (We will of course be working > on addressing the failures.) Thanks for these! To avoid FAILs in the test logs, based on results of running the testsuite on my laptop as well as a system with Nvidia K20 hardware, in r224614, I tuned the XFAILs as follows. Please shout if this doesn't match your results. I noticed one thing, and unless you (Julian, Bernd) are aware of that already, would you (Cesar) please look into figuringing out why there are several execution tests that FAIL for C but PASS for C++? (Maybe the respective C and C++ tree dumps are similar enough to make a comparison feasible?) If the FAILs can be attributed to some missing implementation in OMP lowering/expansion, then that's fine (that is, currently expected) -- but why then do the tests PASS for C++? Curiously, there is one test case, libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c, that started FAILing (again for C only; »private-vars-loop-gang-3.exe: [...]/private-vars-loop-gang-3.c:28: main: Assertion `arr[i] == i + (i / 32) * 2' failed.«) only after your (Cesar's) recent gomp-4_0-branch, r224586 »Only use static_chunk scheduling for acc gang loops when a the gang clause contains a non-'*' static argument«. Maybe that can give a clue, maybe not. commit d29c4d788a5857884584f048c45f6959643b98eb Author: tschwinge Date: Thu Jun 18 14:14:40 2015 +0000 Tune XFAILs ... for tests added in gomp-4_0-branch, r224561. libgomp/ * testsuite/libgomp.oacc-c++/c++.exp (check_effective_target_c): New procedure. * testsuite/libgomp.oacc-c/c.exp (check_effective_target_c): Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c: Tune XFAILs. * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@224614 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog.gomp | 27 ++++++++++++++++++++ libgomp/testsuite/libgomp.oacc-c++/c++.exp | 4 +++ .../private-vars-local-worker-1.c | 2 +- .../private-vars-local-worker-2.c | 2 +- .../private-vars-local-worker-4.c | 1 + .../private-vars-loop-gang-3.c | 6 +++++ .../private-vars-loop-gang-4.c | 3 ++- .../private-vars-loop-worker-2.c | 2 +- .../private-vars-loop-worker-3.c | 2 +- .../private-vars-loop-worker-4.c | 2 +- .../private-vars-loop-worker-5.c | 3 ++- .../private-vars-par-gang-3.c | 2 +- libgomp/testsuite/libgomp.oacc-c/c.exp | 4 +++ 13 files changed, 52 insertions(+), 8 deletions(-) Grüße, Thomas diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp index 8b8243a..5cd5d06 100644 --- libgomp/ChangeLog.gomp +++ libgomp/ChangeLog.gomp @@ -1,3 +1,30 @@ +2015-06-18 Thomas Schwinge + + * testsuite/libgomp.oacc-c++/c++.exp (check_effective_target_c): + New procedure. + * testsuite/libgomp.oacc-c/c.exp (check_effective_target_c): + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c: + Tune XFAILs. + * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-4.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-5.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c: + Likewise. + 2015-06-18 Tom de Vries * testsuite/libgomp.fortran/parloops-exit-first-loop-alt-2.f95: New test. diff --git libgomp/testsuite/libgomp.oacc-c++/c++.exp libgomp/testsuite/libgomp.oacc-c++/c++.exp index 8d8f4ff..a3d0eda 100644 --- libgomp/testsuite/libgomp.oacc-c++/c++.exp +++ libgomp/testsuite/libgomp.oacc-c++/c++.exp @@ -14,6 +14,10 @@ if [info exists lang_include_flags] then { unset lang_include_flags } +proc check_effective_target_c { } { + return 0 +} + # Initialize dg. dg-init diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c index f8658e5..957f827 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-1.c @@ -1,4 +1,4 @@ -/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */ +/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ #include diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c index 925f9a0..5bf3e16 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-2.c @@ -1,4 +1,4 @@ -/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */ +/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ #include diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c index 4cec00e..118dae8 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-local-worker-4.c @@ -1,3 +1,4 @@ +/* { dg-xfail-if "TODO" { c } } */ /* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */ #include diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c index 0a77869..bc96f0d 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-3.c @@ -1,3 +1,9 @@ +/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ +/* Fails as of gomp-4_0-branch r224586, but for C only: + + private-vars-loop-gang-3.exe: [...]/private-vars-loop-gang-3.c:28: main: Assertion `arr[i] == i + (i / 32) * 2' failed. +*/ + #include /* Test of gang-private variables declared on loop directive, with broadcasting diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-4.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-4.c index 24b0059..f0f0477 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-4.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-gang-4.c @@ -1,4 +1,5 @@ -/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */ +/* { dg-xfail-if "TODO: ICE" { *-*-* } } */ +/* { dg-excess-errors "TODO" } */ #include diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c index 834b0f1..a5f16d8 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-2.c @@ -1,4 +1,4 @@ -/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */ +/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ #include diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c index 18d6229..5c75f4d 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-3.c @@ -1,4 +1,4 @@ -/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */ +/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ #include diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c index 881bc7d..f0d1309 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-4.c @@ -1,4 +1,4 @@ -/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */ +/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ #include diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-5.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-5.c index fc1535b..741795d 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-5.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-loop-worker-5.c @@ -1,4 +1,5 @@ -/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */ +/* { dg-xfail-if "TODO: ICE" { *-*-* } } */ +/* { dg-excess-errors "TODO" } */ #include diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c index e5387c6..c580d68 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/private-vars-par-gang-3.c @@ -1,4 +1,4 @@ -/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */ +/* { dg-xfail-run-if "TODO" { c && openacc_nvidia_accel_selected } { "*" } { "" } } */ #include diff --git libgomp/testsuite/libgomp.oacc-c/c.exp libgomp/testsuite/libgomp.oacc-c/c.exp index 8d54815..15e8f81 100644 --- libgomp/testsuite/libgomp.oacc-c/c.exp +++ libgomp/testsuite/libgomp.oacc-c/c.exp @@ -19,6 +19,10 @@ if ![info exists DEFAULT_CFLAGS] then { set DEFAULT_CFLAGS "-O2" } +proc check_effective_target_c { } { + return 1 +} + # Initialize dg. dg-init