From patchwork Thu Oct 5 08:34:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 821643 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-463497-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="LP0DHg43"; 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 3y75g04Dl0z9t3v for ; Thu, 5 Oct 2017 19:34:49 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=NMg4tBJbuu5LTg2t4 uOZA39+LrCuWJeTW8R3MDxfriIZWnqss6W3UKcfp0Y5wWR3+MVRRsXBM8nRX6NSB QMqz1vb+zwseoneaxRKKYFODB/Q0fWqYB52j7UtFDtK9DSO63svu5maHPIVWVSHN S7s8e5BuOesf2zxFYqha5n4jM8= 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 :subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=UyAq5ivMWrT2gRXXdgKSoh0 Qgto=; b=LP0DHg43i5kpvYxdmSsxLIONS20GhWXdcBjT4WEz2vAb6YNHuyB36B0 SLjK3r22gc1gdNB0OKqpWummlAw+BYNNXUlTo7t87HURJwoC9ZJLXsGzw4shLK1u 3tjfkzDsq2eQh2dV13+o4XwGIth0FPRgwB2YZcwUbULAHYgRohQw= Received: (qmail 108704 invoked by alias); 5 Oct 2017 08:34:40 -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 107899 invoked by uid 89); 5 Oct 2017 08:34:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 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, URIBL_RED autolearn=ham version=3.3.2 spammy=ary 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, 05 Oct 2017 08:34:38 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1e01c3-0000ah-7M from Tom_deVries@mentor.com ; Thu, 05 Oct 2017 01:34:35 -0700 Received: from [127.0.0.1] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 5 Oct 2017 09:34:30 +0100 Subject: [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/{loop-red-g-1, routine-g-1}.c for non-nvidia devices From: Tom de Vries To: Jakub Jelinek CC: Thomas Schwinge , GCC Patches References: <8d323e0d-9790-2fc0-3ea4-2ae73a7c3064@mentor.com> Message-ID: Date: Thu, 5 Oct 2017 10:34:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <8d323e0d-9790-2fc0-3ea4-2ae73a7c3064@mentor.com> X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) [ was : Re: [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/loop-g-{1,2}.c for non-nvidia devices ] On 09/28/2017 08:47 AM, Tom de Vries wrote: > Hi, > > this patch makes the test-cases libgomp.oacc-c-c++-common/loop-g-{1,2}.c >  work for non-nvidia devices. > > For nvidia devices, a vector_length of 32 is required for the test to pass. > > For devices with a non-32 forced vector_length, this test-case will fail > the test for excess errors due to: > ... > warning: using vector_length (x), ignoring 32 > ... > > Fixed by removing the explicit vector_length setting. For nvidia > devices, 32 is required, but that's also the forced default, so there's > no need to be explicit about it. > > Committed as obvious. Committed this similar patch. Thanks, - Tom Fix libgomp.oacc-c-c++-common/{loop-red-g-1,routine-g-1}.c for non-nvidia devices 2017-10-05 Tom de Vries * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c (main): Remove vector_length(32) clause from acc parallel directive. * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c (main): Same. --- libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c | 2 +- libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c index d241d41..929e01c 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c @@ -11,7 +11,7 @@ int main () int ondev = 0; int t = 0, h = 0; -#pragma acc parallel num_gangs(32) vector_length(32) copy(ondev) +#pragma acc parallel num_gangs(32) copy(ondev) { #pragma acc loop gang reduction (+:t) for (unsigned ix = 0; ix < N; ix++) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c index 9d14c3b..b6ab713 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c @@ -36,7 +36,7 @@ int main () for (ix = 0; ix < N;ix++) ary[ix] = -1; -#pragma acc parallel num_gangs(32) vector_length(32) copy(ary) copy(ondev) +#pragma acc parallel num_gangs(32) copy(ary) copy(ondev) { ondev = __builtin_acc_on_device (5); gang (ary);